Solved

How to handke mutiple Winsock Clients messages?

Posted on 2008-10-11
2
237 Views
Last Modified: 2013-11-23
Hi Experts,
My Delphi 6 application need to listen to a TCP port and respond to multi clients messages accordingly.

This is the protocol of the communication.

Connection Request from client , 16 bytes
A B C L 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00

I need to respond with 16 bytes
A B C R  0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00

Then Client will Send 16 + Commad No of Bytes which will be in 8 to 11
A B C L  0x00 0x00 0x00 0x00 8 9 10 11 0x00 0x00 0x00 0x00 ...

I need to respond this with same No of bytes
A B C R  0x00 0x00 0x00 0x00 8 9 10 11 0x00 0x00 0x00 0x00 ...

Finally  Disconnection from Client.
A B C L 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00

I'm VERY new to winsock and TCP comunication. It would be very helpful if it is a detailed working sample.

When I use a Network Snipper WireShark the data for Connection looks is like this
41 42 43 4c 00 00 00 00 00 00 00 00 00 00 00 00

Thanks
PCSC
0
Comment
Question by:pcssecure
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 15

Accepted Solution

by:
mikelittlewood earned 500 total points
ID: 22694206
Take a look at the indy components and demos at http://www.indyproject.org/index.en.aspx
0
 

Author Comment

by:pcssecure
ID: 22695904
I'm seeing something wrong in the format. So re-posting again.
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org Go to that link and select download selenium in the right hand column That will then direct you to their download page. From that p…
If you haven’t already, I encourage you to read the first article (http://www.experts-exchange.com/articles/18680/An-Introduction-to-R-Programming-and-R-Studio.html) in my series to gain a basic foundation of R and R Studio.  You will also find the …
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question