XenoBot Forums - Powered by vBulletin

User Tag List

Results 1 to 3 of 3

Thread: IpcPublisherSocket ports

  1. #1
    Monthly Subscriber
    Join Date
    Jun 2012
    Posts
    185
    Mentioned
    22 Post(s)
    Tagged
    0 Thread(s)

    Unhappy IpcPublisherSocket ports

    1) Is it possible to check if x port is already used by IpcPublisherSocket without crashing script?

    Code:
    14:30 XenoScript Error:
               Script: 111/11.lua
               Error: Address in use
    This is an error with user-input and should not be reported as a bug with
    XenoBot.
    2) Is there an IPC pattern that allows to have multiple publishers and only one subscriber? I want to send data from multiple clients to "server" which will do something with data and will never send anything back to clients.

    I think it's possible with REP/REQ but I don't want server to send anything back to clients because when server crashes or turns off all clients will wait for response but they will never get it because server is off.

  2. #2
    XenoBot Scripts Developer Syntax's Avatar
    Join Date
    Feb 2011
    Posts
    1,658
    Mentioned
    431 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by eldera View Post
    1) Is it possible to check if x port is already used by IpcPublisherSocket without crashing script?

    Code:
    14:30 XenoScript Error:
               Script: 111/11.lua
               Error: Address in use
    This is an error with user-input and should not be reported as a bug with
    XenoBot.
    2) Is there an IPC pattern that allows to have multiple publishers and only one subscriber? I want to send data from multiple clients to "server" which will do something with data and will never send anything back to clients.

    I think it's possible with REP/REQ but I don't want server to send anything back to clients because when server crashes or turns off all clients will wait for response but they will never get it because server is off.
    The server can run a publisher where client subscribing gets an available port in the message.
    Once the client gets the port it sets up a subscriber that the server is already listening to.
    The client sends a message saying "hey I used this port" and the server increments the port for the next client connecting to use.
    Now you have a bi-directional communication using multiple pub/subs.

    I can post an example soonish if you need it.

  3. #3
    Monthly Subscriber
    Join Date
    Jun 2012
    Posts
    185
    Mentioned
    22 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Syntax View Post
    The server can run a publisher where client subscribing gets an available port in the message.
    Once the client gets the port it sets up a subscriber that the server is already listening to.
    The client sends a message saying "hey I used this port" and the server increments the port for the next client connecting to use.
    Now you have a bi-directional communication using multiple pub/subs.

    I can post an example soonish if you need it.
    Nah you don't need to. Thanks for help!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •