CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2004
    Posts
    15

    Java and sockets help

    I want to write something like an IRC or chat client in Java (using the ASCII protocol).

    Should I be using a BufferedReader of an InputStream of a Socket to read data?

    The main reason why i don't know how to send data through a socket is because i dont know how to send bytes or words with Java. Can someone provide an example please?

  2. #2
    Join Date
    Feb 2004
    Location
    USA - Florida
    Posts
    729

    Re: Java and sockets help

    The Java Tutorial happens to have a few examples: http://java.sun.com/docs/books/tutor...ing/index.html
    Hungarian notation, reinterpreted? http://www.joelonsoftware.com/articles/Wrong.html

  3. #3
    Join Date
    Jul 2004
    Posts
    15

    Re: Java and sockets help

    Quote Originally Posted by cma
    The Java Tutorial happens to have a few examples: http://java.sun.com/docs/books/tutor...ing/index.html
    Thanks, those are helpful, but i can't seem to find or google any examples of bytes/words/dwords sending in Java. Are there any handy tutorials lying around for that?

  4. #4
    Join Date
    Feb 2004
    Location
    USA - Florida
    Posts
    729

    Re: Java and sockets help

    There are a few old forum posts that deals with transferring data over sockets, such as: http://www.codeguru.com/forum/showthread.php?t=283663

    Transferring data over a network is not that much different from reading/writitng data to a file.
    Hungarian notation, reinterpreted? http://www.joelonsoftware.com/articles/Wrong.html

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured