I'm trying to develop a client application for a game server.
For example i would like to restart server with counter-strike on it.
In a simple way i just open CS console and type "restart" command.
I know the IP and port number where the game is hosted.
I've allready tried on Sockets and cast commands via output stream but it doesnt seam to work in a such a simple way (not feeling shocked, ofc :P ).
Could some1 tell me how to get into this or has any ideas ?

i would like to restart server

Does the server have a protocol/message definition that you can use to send it a message telling it to do a restart?