How to write data to a socket ?
Hello,
Can anyone give me a sample code for how to write data to a socket ?
What should I use a socket or a server socket ?
Please give me a sample code.
Thanks!
Hello,
Can anyone give me a sample code for how to write data to a socket ?
What should I use a socket or a server socket ?
Please give me a sample code.
Thanks!
did u try searching to forums before posting your question? You'd be surprised at how many people ask the EXACT same questions.
Yes..I did...
I did not find what i wanted...
> Can anyone give me a sample code for how to write
> data to a socket ?
theSocket.getOutputStream().write(97);
> What should I use a socket or a server socket ?
Use a Socket if you're writing a client, use a ServerSocket if you're writing a server.
> Please give me a sample code.
Reading a tutorial would be helpful before you start writing code, I think. Your Google search words should be "Java socket tutorial".
Thanq !