?
Solved

can you answer me about client/server???

Posted on 2003-03-01
6
Medium Priority
?
153 Views
Last Modified: 2010-04-04
What I want to do is to implement some kind of client/server in my project
the problem is how can I implement the full control between two computers
in Delphi
the server can “print the client server,open the CD-drive … ”
0
Comment
Question by:xfaresx
[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
6 Comments
 
LVL 4

Expert Comment

by:nestorua
ID: 8047624
HI,
You can use for example TClientSocket/TServerSocket components. You send from the Client the message with corresponding command and the server program execute that command. That's all.
Sincerely,
Nestorua.
0
 

Accepted Solution

by:
Joshjje earned 200 total points
ID: 8052983
Yea, add the TClientSocket to your client program.  Add all the information to it (Host and Port) then use ClientSocket1.Open; to initiate the connection.  On the server program add the TServerSocket set Port, then use ServerSocket1.Open; to wait for the client to connect.  

Now to send data you would use ClientSocket1.Socket.SendText('some data');  Thats how you can send your commands to the server.

Now your server would have to recieve the text and then interpret it to do what you wish.  You would have to use the ServerSocket OnClientRead event (ServerSocketClientRead).  To say add the received data to a memo you would do:

procedure TForm1.ServerSocketClientRead(Sender: TObject;
  Socket: TCustomWinSocket);
begin
  Memo1.Lines.Add(Socket.ReceiveText);
end;

Socket.ReceiveText will return the text sent to it by the client.

If you need a more indepth explanation tell me.
0
 
LVL 1

Expert Comment

by:Wax0r
ID: 8058038
Seeing as you seem to be steering for some sort of RAT utility you might want to have a go at a bit of a personal protocol thing, such as:

msg:This would popup a message with this content
cdr:open  - this would open the cdrom drive
cdr:close - this would close the cdrom drive

To keep things easy you could do it UDP so you don't have to worry about making a connection before sending any data but having said that, TCP -is- the better choice as UDP is vulnerable to (possible!) packet loss.

Any other questions feel free to ask.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Expert Comment

by:CleanupPing
ID: 9317009
xfaresx:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
LVL 5

Expert Comment

by:snehanshu
ID: 9999554
Hi!
No comment has been added lately and this question is therefore classified abandoned.

If asker wishes to close the question, then refer to
http://www.experts-exchange.com/help/closing.jsp

Otherwise, I will leave a recommendation in the Cleanup topic area that this question is:

Answered by: Joshjje

Please leave any comments here within the next seven days. It is assumed that any participant not responding to this request is no longer interested in its final disposition.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

...Snehanshu
EE Cleanup Volunteer
0
 
LVL 1

Expert Comment

by:Computer101
ID: 10029497
Forced accept

Computer101
E-E Admin
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

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…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses
Course of the Month12 days, 21 hours left to enroll

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