Solved

ServerSocket & Console App

Posted on 2004-03-21
5
431 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
ID: 10643682

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

Accepted Solution

by:
shaneholmes earned 240 total points
ID: 10643692
//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-
ID: 10643700
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-
ID: 10643713
Dont matter got it now,

var
AServerSocket: TServerSocket;

Thx For your help.
0
 
LVL 11

Expert Comment

by:shaneholmes
ID: 10643720
OK, Let me know if you need anymore help!

Shane
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Suggested Solutions

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…
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…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

777 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