TCP server on WAGO 750-841: SysSockSelect problem

olegf
2008-06-25
2018-01-29
  • olegf - 2008-06-25

    Hello,

    I try to create TCP server on WAGO 750-841 using SysLibSockets.lib.

    I call following functions:

    SysSockCreate

    SysSockBind

    SysSockListen

    They all return normal results.

    Than I need to accept incoming connection if available. But I don’t want SysSockAccept function to block my program.

    So I call SysSockSelect function with fdRead parameter set to my socket (wrapped into SOCKET_FD_SET). Timeout set to several seconds (I tried different values from 4ms to 4s).

    SysSockSelect always returns 0 (even if there is a connection).

    If I remove SysSockSelect function – all works good.

    Please help me.

    Thanks,

    Oleg

     
  • olegf - 2008-07-07

    I have solved this problem. Now I use only SysSockIoctl to set non-blocking socket mode and don't use SysSockSelect function.

     
  • danyamian - 2018-01-29

    olegf hat geschrieben:
    I have solved this problem. Now I use only SysSockIoctl to set non-blocking socket mode and don't use SysSockSelect function.

    Hi, I'm working on a similar project. I have a raspberry in which I need to run a TCP server where I will receive messages from clients by sockets. I can not get it to work properly, have you managed to get it to work properly? Do you have more information about the server or an example project?

    Thank you very much.

     

Log in to post a comment.