Solved

Getting Data from a TServerSocket

Posted on 2001-07-26
5
210 Views
Last Modified: 2010-04-06
I have a TServerSocket that I am connecting to from a different machine using a TClientSocket. The TServerSocket Listens fine, then Connects and Accepts when the TClientSocket is set to Active. However when I use TClientSocket.Socket.SendStream to send out information the TServerSocket does not fire its OnClientRead event as I have been lead to believe it is suposed to. As far as I know the place to process the data comming from the TClientSocket is in the OnClientRead event. Am I missing something simple or have I got the process wrong? Any advise would be appreciated.
0
Comment
Question by:Siband
  • 3
5 Comments
 
LVL 21

Expert Comment

by:gemarti
ID: 6321866
Is your ServerSocket.Active Set to true?

Are the Ports set correctly? (i.e. Ports = 1024)

Does the ClientSocket know what host is supposed to be talking to?

0
 
LVL 1

Accepted Solution

by:
h_mohsenian earned 50 total points
ID: 6322208
I think that is better at first you test ur application by SendText ( not SendStream ) and for learning the details see the Char Delphi standard Demo ( in folder Demo\Internet ) It is a good app and I started using TServerSocket & TClienSocket by this Demo!

best regards
hamed
0
 
LVL 1

Expert Comment

by:h_mohsenian
ID: 6322214
oh, chat demo not char demo ;-)
0
 

Author Comment

by:Siband
ID: 6322917
I have actually sorted it out myself. (I had not been setting my TStream position back to 0 before trying to send it - D'oh!!). However had I not spotted this, I think your sugestion would have been the best way forward so I'm awarding the points quickly before too many other people catch on to my stupidity!
0
 
LVL 1

Expert Comment

by:h_mohsenian
ID: 6325537
:-) thanks and good coding ;-)
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

821 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