Solved

Getting Data from a TServerSocket

Posted on 2001-07-26
5
211 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
[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
  • 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
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…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

752 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