Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Getting Data from a TServerSocket

Posted on 2001-07-26
5
Medium Priority
?
225 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 150 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
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…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses

886 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