Solved

ServerSocket & Console App

Posted on 2004-03-21
5
427 Views
Last Modified: 2010-04-05
Hello,

How can I use ServerSocket's in a console app, Or somethink like ServerSocket that can be used in console app.

Thx Karamja
0
Comment
Question by:-Karamja-
  • 3
  • 2
5 Comments
 
LVL 11

Expert Comment

by:shaneholmes
Comment Utility

 AServerSocket:= TServerSocket.Create(nil);
 
 SHane
0
 
LVL 11

Accepted Solution

by:
shaneholmes earned 240 total points
Comment Utility
//create the server socket
 AServerSocket:= TServerSocket.Create(nil);
 //set its port
 AServerSocket.Port:= 1024;
 
//set its events - note: You will have to create this methods yourself, and assign them to the events
//here are three example events. You may want to use other events available as well. See help
 AServerSocket.OnClientConnect:= MyClientConnect;
 AServerSocket.OnAccept:= MyAccept;
 AServerSocket.OnListen:= MyListen;

 //set active = true
 AServerSocket.Active:= True;

Shane


Shane
0
 
LVL 2

Author Comment

by:-Karamja-
Comment Utility
Where do I put this code and how to I use it. Remember im making a console app.

program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;

begin

end.
0
 
LVL 2

Author Comment

by:-Karamja-
Comment Utility
Dont matter got it now,

var
AServerSocket: TServerSocket;

Thx For your help.
0
 
LVL 11

Expert Comment

by:shaneholmes
Comment Utility
OK, Let me know if you need anymore help!

Shane
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Virtualstringtree carsh after invalidate for while 5 80
Sending Gmail through Delphi 3 69
Delphi cmd execution 6 40
LAN or WAN ? 11 58
A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

744 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now