Shop OBEX P1 Docs P2 Docs Learn Events
Enabling Multiple Sockets — Parallax Forums

Enabling Multiple Sockets

FinnCAFinnCA Posts: 11
edited 2011-03-24 20:49 in Accessories
Is there a way to enable multiple sockets on the spinneret? I am working on a project that is pretty big and the spinneret is taking forever to serve the files. If I could enable all sockets it would really help.

Comments

  • DynamoBenDynamoBen Posts: 366
    edited 2011-03-22 19:45
    Yes, you have 4 sockets at your disposal. Just use the SocketOpen method to setup each.
  • FinnCAFinnCA Posts: 11
    edited 2011-03-23 07:35
    So I would just create multiple
    W5100.SocketOpen(0, W5100#_TCPPROTO, localSocket, destSocket, @destIP[0])
    

    changing the 0 to 1-3

    and create multiple
    PRI OpenSocketAgain
      W5100.SocketOpen(0, W5100#_TCPPROTO, localSocket, destSocket, @destIP[0])
      W5100.SocketTCPlisten(0)
      return
    
    entries substituting the SocketOpen(0 for SocketOpen(1 through SocketOpen(3 and
    W5100.SocketTCPlisten(0) for W5100.SocketTCPlisten(1) through W5100.SocketTCPlisten(3).
  • DynamoBenDynamoBen Posts: 366
    edited 2011-03-23 08:07
    You got it. While that does indeed open multiple sockets, I can't be sure that accomplishes what you want it to.
  • FinnCAFinnCA Posts: 11
    edited 2011-03-23 16:33
    Does the Spinneret automatically push information through all available sockets or does it have to be configured further to dispatch information? After enabling all sockets I did not see any change in speed and have no way of telling if they are being used.
  • DynamoBenDynamoBen Posts: 366
    edited 2011-03-23 16:48
    FinnCA wrote: »
    Does the Spinneret automatically push information through all available sockets or does it have to be configured further to dispatch information? After enabling all sockets I did not see any change in speed and have no way of telling if they are being used.

    Nothing is automatic, you will need to implement what you are hoping to accomplish in code. You will need to place data into each socket independently for it to be sent.
  • pthartmannpthartmann Posts: 27
    edited 2011-03-24 20:12
    DynamoBen wrote: »
    Nothing is automatic, you will need to implement what you are hoping to accomplish in code. You will need to place data into each socket independently for it to be sent.

    Would one be able to increase transmission speed, say with a repeating AJAX request?
    I have this suspicion that utilizing multiple sockets is a daunting task.
  • DynamoBenDynamoBen Posts: 366
    edited 2011-03-24 20:49
    pthartmann wrote: »
    Would one be able to increase transmission speed, say with a repeating AJAX request?
    I have this suspicion that utilizing multiple sockets is a daunting task.

    Not sure, I'm not well versed in AJAX.

    I guess in this specific case it depends on the problem, which FinnCA has described yet.
Sign In or Register to comment.