Sir I would like to thank you for all the codes that helped me in my assesments. Without you I was in Dark. Thanks for showing me the way. If ever i get a chance to meet you my life would be complete.
It helps in manipulating options for the socket referred by the file descriptor. Really cool, it actually works unlike other tutorials.
How do I make it so when the server restarts, the client is able to connect in the same session, without having to restart the client? Your email address will not be published. Now: beej. Tony Delroy Tony Delroy This is basically a book recommendation. Is that part of the standards at Stack Overflow? I gave a recommendation on how to learn the library since there aren't many online tutorials. I do answer the question. But, I can remove it and make it more generic by saying that there aren't many online tutorials but there are books available to help learning the library.
Would that be better? I am not being critical of you. I only made a comment because I see a lot of mixed standards at this site. I see numerous posts struck down for making recommendations and then I see countless recommendations at the site. I have no issues with recommendations but it seems a lot of people do at this site. Maybe give a snippet of code for a client and server exchanging simple hello messages would be appropriate.
Ted Shaneyfelt Ted Shaneyfelt 2 2 silver badges 13 13 bronze badges. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password.
Post as a guest Name. Email Required, but never shown. By Priya Pedamkar. If we take a real-life example then the socket we see in reality is a medium to connect two devices or systems. It can be either a phone charger plugging into the socket or a USB cable into our laptop.
In the same way, Sockets let applications attach to the local network at different ports. Every time a socket is created, the program has to specify the socket type as well as the domain address. Methods can be created in many ways. One of the ways is:. After creating a socket we need a method to get input from the user in some way. This input stream method will return the InputStream representing the data attached to this socket. It also throws an exception.
Make sure the object must be returned every time you call this method to avoid errors.
0コメント