Click here to Skip to main content
15,031,687 members
Please Sign up or sign in to vote.
1.33/5 (3 votes)
See more:
Hello everyone!

I hope I'm on the right place to ask.

I'm new to network programming in Java (and know some technical stuff in C++ and C#)

I've read some quick tutorials about this topic.

I wanna start with a very interesting project.

One program (let call program A) runs on one computer (let call computer A). One program (let call program B) runs
on another computer (let call computer B). The computers are connected in LAN network.

Program A sends a request to computer B. This request is about locking computer B's keyboard (or take a picture of screen shot of computer B). After getting this request, program B send a feedback to computer A, and
there will be a window on computer A with a CAPTCHA to ensure that the response is generated by a person. After the person on computer A side enters the captcha, let say the computer B's keyboard will be locked.

I guess my explanation is clear.

So please give a quick tutorial or any sugesstion to get me started writting code.

Any help would be greatly appreciated!

1 solution

Program A and B will be connected via socket just like client(B) and server(A). Client can be service in the computer B so that it has all kind of power to perform the task. Now you need to define some particular list of request which can be performed by the application. So that client will have a code for handling each task. Now server will send a command to the client and client will perform that command in its command handler. For an example: we have one task of shutdown. Now client will be having a handler for this shutdown task. This handler will also handle the parameters handled by shutdown.exe. Now server sends a request shutdown with parameter -r. After receiving this request, client will call "shutdown.exe -r" so that it restarts the computer.
This is one of the standard way to perform this type of task. Firewall and antivirus type of issue can be removed by this type of design.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900