Jump to content
TristanC

Issue with basic TCP server and ICS 9.4

Recommended Posts

First let me preface it by saying I use ICS with C++ Builder 12 and not with Delphi.
I apologize if this is not the right place to talk about my issue but it is the most active place I found discussing ICS.

I am trying to build a very simple TCP server using a TWSocketServer accepting connections from TWSocketClient.

I have coded such a server on C++ Builder XE8 with ICS 8.47 and it works just fine.

However, I am in the process of upgrading to C++ Builder 12 and to ICS 9.4 and it is where my issues start.

The server starts fine, and when I try to connect a client, I get the event and the client is accepted.
However, when I check the client data in the debugger, everything is set to NULL.

And after this first connection, my server doesn’t receive any other event, whether it is other clients connection, the deconnection of a client or any data that a client might send.

Does someone have any idea what could cause this ?

I have enclosed my .h and .cpp files but it is very basic.

Unit1.cpp

Unit1.h

Share this post


Link to post

Are you saying the same code runs OK in the older version of ICS, but not the new version?    

 

You don't say what your project is for, but you would be better starting with the TIcsIpStrmLog component that hides all the low level stuff from you, try running the pre-built OverbyteIcsIpStmLogTst sample, configuring it as a TCP Server, and start it.  All the logging for diagnostics is built in. 

 

Angus

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×