CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum by 3S-Smart Software Solutions GmbH | A member of the CODESYS Group
Deutsche Version English version russian version 
It is currently Fri Nov 15, 2019 10:13 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 1 post ] 
Author Message
PostPosted: Wed Apr 06, 2016 12:03 pm 
Offline

Joined: Wed Feb 24, 2016 9:02 am
Posts: 1
Hello,
we are quite new to CodeSys 3.5, while we are quite experienced with CodeSys 2.

In CodeSys 2 for managing incoming TCP connections we used the 'SysLibSocket.lib' library, that seems that it been ported in CodeSys 3.5 as 'SysSocket23'.

The fact is that we noticed a strange behavior of the new Librarys w.r.t. the following call:

m_BytesReceived:= SysSockRecv( m_Socket, ADR(m_ReceiveBuffer), SIZEOF(m_ReceiveBuffer), 0);

In CodeSys 2, with 'SysLibSocket.lib', m_BytesReceived is valued to 0 when the socket is closed by the client, -1 only if the socket is active and no characters have been sent by the client.

In CodeSys 3, with 'SysSocket23' we noticed that m_BytesReceived is -1 in both cases: if the socket is active and no data have been sent, but also if the socket has been closed by the client.

How can we detect if the client has closed the socket with CodeSys 3 and 'SysSocket23'?

Many thanks,
Diego


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 1 post ] 

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited