markymark31
Member
Hi Guys,
Is anyone able to take a look at the attached and tell me where I am going wrong ?
This is my first go at socket communication so in this test program is a routine called "Mettler_Socket_Comms".
I think I need to ......
Create a Socket
Accept a connetion (to listen to the port)
Read some data when it is sent to me
Whilst online to the processor i can manually trigger each of these steps and using the web page of the EWEB I can monitor what's going on.
The Mettler_CreateSocket seems to work and returns an instance. But I can't get the Mettler_AcceptConnection message to work. It returns an error 70 EWOULDBLOCK "Operation would block" according to the manual but I don't understand the error.
The Mettler_AcceptConnectionTimeout waits for 60 second of inactivity before closing the socket, and if i change SockAcceptTimeout from 100 ms to 60000 ms I can get the socket to show as "Listen" on the web page for 60 seconds before dropping out with the above error. But I can't get the connection to accept and return with an instance.
Until this bit is sorted I can't move on to the READ !
Any help will be appreciated ....
Mark.
Is anyone able to take a look at the attached and tell me where I am going wrong ?
This is my first go at socket communication so in this test program is a routine called "Mettler_Socket_Comms".
I think I need to ......
Create a Socket
Accept a connetion (to listen to the port)
Read some data when it is sent to me
Whilst online to the processor i can manually trigger each of these steps and using the web page of the EWEB I can monitor what's going on.
The Mettler_CreateSocket seems to work and returns an instance. But I can't get the Mettler_AcceptConnection message to work. It returns an error 70 EWOULDBLOCK "Operation would block" according to the manual but I don't understand the error.
The Mettler_AcceptConnectionTimeout waits for 60 second of inactivity before closing the socket, and if i change SockAcceptTimeout from 100 ms to 60000 ms I can get the socket to show as "Listen" on the web page for 60 seconds before dropping out with the above error. But I can't get the connection to accept and return with an instance.
Until this bit is sorted I can't move on to the READ !
Any help will be appreciated ....
Mark.