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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
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.