Advanced Java network programming

I have been playing around with the various Server/Client tutorials not only on this site but many others for some time now. Whilst I have learnt a great deal I am now trying to further my knowledge.
The problem is, there does not seem to be a great deal of information on the Web realting to the advanced network programming stuff. Obviously not having a network of my own I am now interested in learning various ideas using the Internet. Obviously not being a prat about it and port scanning other computers or anything like that.
I was hoping someone reading this might have a suggestion about where to go next in my learning curve. Also if anyone could recommend any good sources of info for this type of stuff.
I've currently got three telephone lines in, each line with a seperate Internet account set-up. What I want to do is have them all connected to the web at once and then attempt various things, such as connection, that type of stuff.
Help really appreciated.
Thanks,
kP

Maybe I'm catching the wrong vibe here, but it seems to me that you need to learn a bit about networking in general, before you worry about how it's all done in java. I would suggest a good basic computer networking text book. After you have good understanding of how different networks works, packet structure of the various common protocols, IP, TCP over IP and UDP over IP. I think the java code to implement it all will just fall into place. my AIM SN is SpinozaQ if you would like a book suggestion. I don't have any names going through my head right now.

Similar Messages

  • Advanced Java Networking Tutorials

    Hi,
    Can you please give me some links where I can find some Advanced Java Networking Tutorails. The tutors I find in Sun site are not so advanced.
    Thanks
    Joe

    What kind of advanced networking? RMI, Corba, SOAP, ...? Google for tutorials. Plain sockets? After you know the Java socket API you'll need to get into the fine details of TCP, UDP and IP which are mostly language independent.
    There are also books; one is "Fundamental Networking in Java", the author of which regularly hangs in the Java socket programming forum. If you get his book you'll always have someone who can't possibly refuse to help you: "hey ejp, I read your book and I have this problem..." :-)

  • Desperately need Java network programming help!!!

    I need to make a Distributed File Sharing System (DFSS) using java language. The system should not make use of the central file server. The system should coordinate the concurrent access of files over the distributed environment. Caching may be used to enhance the system performance.
    It is basically network programming.
    Does any one have any idea how to make the DFSS. If you do please help!!!
    thank you in advance for you help
    cheers

    well, you're getting somewhere I guess. My original answer was intentionally vague because your original question was so vague. These fora are no good for asking questions like "how do I implement a distributed file system", they are good for asking things like "the following line(s) of code generate the following condition I didn't expect, rather I expected this condition, could someone tell me what is going on?" or something of similar specificity.
    So you are now asking how to, for instance, check to see if a text file is being shared. This is still too vague, but it's better than "how do I write a file sharing system". If you are feeling particularly industrious, go look at a project JXTA at http://www.jxta.org/ - it's open source, you can look at the code. Of course, if you're brand new, this might not help. In fact, not to discourage you, but if you're that new, this is not the project to be doing.
    Good Luck
    Lee

  • Where can I find knowledge about "java network programming"?

    I am interested in network programming in java. I need some documents and I don't where can I find it?

    http://java.sun.com/docs/books/tutorial/networking/index.html

  • Help needed for java network programming

    How can I implement a GUI as a client in my server-client program.
    I have a window(JFrame)having one Textfield and a "Send" button.
    My requirement: While execution, the GUI should start as a client, and whatever textinput I will give to the Textfield, that should be printed in the server program.
    So, how can I implement a GUI window as a client.
    If any of U have idea,Please let me know soon.
    Regards.

    Well, the client part and the GUI part are separate. The button simply calls a send method.
    As for the networking, you can just use a Socket and a ServerSocket on the client and server, respectively. Then, wrap a PrintStream around one side and a BufferedReader(InputStreamReader()) around the other. You'll be able to talk back and forth once your connection is established; it's up to you to read from the BufferedReader and use the results on the server side.

  • Java networking program

    Dear Sir,
    I amstudying in Deakin International for MIT course and my main subject is java networkprogramming but i feel it diffcuilt.We have diferent assignments so please send me some tutorials or notes based on this subject please also some programming codes also based on each topic as it is hard for me
    thankyou

    http://java.sun.com/docs/books/tutorial/

  • Java Network Programming

    I am trying to make a Third-party chat client an alternative of rediffbol for rediffchat
    * To do this, I downloaded a packet sniffer (Sniphere) and started monitoring the packets sent and received by the original Rediff messenger.*
    * Rediff Bol uses the MSNP protocol to connect...*
    *1. First the client establishes a tcp connection with the DISPATCH server "203.199.83.62 : 1863"*
    *2. then the client sends the DISPATCH server its VERSION and a command so that the dispatch server can send back a list of available notification servers...*
    *3. Then the DISPATCH server sends back the client a list of available NOTIFICATION servers......the client connects there and like this it goes on...*
    I am using Java. I captured the packet 2. where the command the and the version is sent. I sent the exact packet to the server but due to some reason the dispatch server is not sending back the list of NOTIFICATION servers...
    the client.java is attached
    there is a difference of negotiation that is occuring between my prog-server and rediffmessenger-server
    its like this
    pck 1<client-outgoing>: 2<server-incoming> and 3<client-outgoing> which I think is a three way handshaking...its same with my program as the original rediffmessenger
    pck 4: this in case of the rediffmessenger is the command and version<outgoing>...same in my case
    pck5:  this is supposed to be an incoming stream from server 203.199.83.62:1863 which will have the data of available notification servers......WHICH in my case is becoming an outgoing packet from my client<i didnt send anything except the command , refer to client.java> which contains nothing as DATA...and in the later packets the server never sends the list of notification servers...

    import java.net.*;
    import java.nio.*;
    import java.nio.charset.*;
    import java.nio.charset.Charset;
    import java.io.*;
    import java.io.FileOutputStream;
    class client extends Object implements java.io.Serializable
    private static byte[] getBytes (char[] chars)
    Charset cs = Charset.forName ("UTF-8");
    CharBuffer cb = CharBuffer.allocate (chars.length);
    cb.put (chars);
    cb.flip ();
    ByteBuffer bb = cs.encode (cb);
    return bb.array();
    public static void main( String args[] )
    File f2=new File("data.dat");
    int decimal_value;
    char[] extract_char;
    extract_char=new char[2];
    char[] dat;
    byte[] bytes=new byte[19];
    byte[] bytes2=new byte[19];
    String str;
    int count=0;
    dat=new char[19];
    String getloginserver="564552203134204D534E503820435652300D0A"; //The data packet to ask for notification servers(Hex Dump)
    //coverting it into byte array--THIS PART IS WORKING OKAY
    for(int i=0;i<(getloginserver.length()-1);i+=2)
    extract_char[0]=getloginserver.charAt(i);
    extract_char[1]=getloginserver.charAt(i+1);
    str=Character.toString(extract_char[0])+Character.toString(extract_char[1]);
    decimal_value=Integer.parseInt(str, 16);
    dat[count++]=(char)decimal_value;
    count=0;
    bytes=getBytes(dat);
    //for(int j=0;j<30;j++)
    //System.out.print((char)bytes[j]);
    for(int j=1;j<19;j++)
    bytes2[j-1]=bytes[j];
    //converting hex dump to byte array completed
    // bytes2[] is the byte array which contains the command for the server..it has to be sent...
    //establish connection and send
    try
    Socket toServer;
    toServer = new Socket ("65.54.239.80",1863);
    OutputStream os = toServer.getOutputStream();
    os.write(bytes2);
    os.flush();
    catch ( IOException e )
    System.out.println("Cannot write to the server " + e );
    Thats why i didnt post code....its big....

  • Simple Java Network Programming Question

    import java.io.*;
    import java.net.*;
    public class ConsumerClient
         private static InetAddress host;
         private static final int PORT = 1234;
         private static Socket link;
         private static Resource item;
         private static BufferedReader in;
         private static PrintWriter out;
         private static BufferedReader keyboard;
         public static void main(String[] args)     throws IOException
              try
                   host = InetAddress.getLocalHost();
                   link = new Socket(host, PORT);
                   in = new BufferedReader(new InputStreamReader(link.getInputStream()));
                   out = new PrintWriter(link.getOutputStream(),true);
                   keyboard = new BufferedReader(new InputStreamReader(System.in));
                   String message, response;
                   do
                        System.out.print("Enter 1 for resource or 0 to quit: ");
                        message = keyboard.readLine();
         if(message.equals("1")**
                             item.takeOne();**
                        //Send message to server on
                        //the socket's output stream...
                        out.println(message);
                        //Accept response from server on
                        //the socket's input stream...
                        response = in.readLine();
                        //Display server's response to user...
                        System.out.println(response);
                   }while (!message.equals("0"));
              catch(UnknownHostException uhEx)
                   System.out.println("\nHost ID not found!\n");
              catch(IOException ioEx)
                   ioEx.printStackTrace();
              finally
                   try
                        if (link!=null)
                             System.out.println("Closing down connection...");
                             link.close();
                   catch(IOException ioEx)
                        ioEx.printStackTrace();
    }

    georgemc wrote:
    BlueNo yel-- Auuuuuuuugh!
    But the real question is: What is the air-speed velocity of an unladen swallow?

  • Java network programming explanation

    I have refer to following code, i not so understand, can somebody explain it to me? Thanks
    try {
    e = NetworkInterface.getNetworkInterfaces();
    while (e != null && e.hasMoreElements()) {
    NetworkInterface net = (NetworkInterface) e.nextElement();
    Enumeration enum = net.getInetAddresses();
    while (enum.hasMoreElements()) {
    InetAddress inet = (InetAddress) enum.nextElement();
    new FileServerThread(inet);
    catch (SocketException ex) {
    }

    try {
        // get an Enumeration of network interfaces
        e = NetworkInterface.getNetworkInterfaces();
        // iterate through the Enumeration
        while (e != null && e.hasMoreElements()) {
            // retrieve the next individual NetworkInterface object from
            // the enumeration
            NetworkInterface net = (NetworkInterface) e.nextElement();
            // get the enumeration of InetAddresses from the
            // NetworkInterface
            Enumeration enum = net.getInetAddresses();
            // iterate through the InetAddresses
            while (enum.hasMoreElements()) {
                // get the next InetAddress object from the enumeration
                InetAddress inet = (InetAddress) enum.nextElement();
                // instantiate a new FileServerThread for the given
                // InetAddress
                new FileServerThread(inet);
    // catch any thrown Exception objects
    catch (SocketException ex) {
    } What questions are you having about this pretty basic piece of code?

  • Java Network Programming using UDP protocol

    I am trying to send the object using UDP protocol.
    In my client class it is giving me NullPointer excetion at clientSocket.send(sendPacket); although sendPacket is not null it has the value that I am passing.
    Here is the code :
    private boolean clientSrvrComm(AuditorData audData) throws Exception
              boolean result = false;
              ByteArrayOutputStream barray_out = new ByteArrayOutputStream();
              ObjectOutputStream obj_out = new ObjectOutputStream(barray_out);
              obj_out.flush();
              obj_out.writeObject(audData);
              obj_out.flush();
              // sending the data to the server
              byte[] sendData = barray_out.toByteArray();
              DatagramPacket sendPacket = new DatagramPacket(sendData,sendData.length,IPAddress,serverPort);
              clientSocket.send(sendPacket); // getting exception at this line
              return result;
         } // method end
    I am passing audData through main method.
    Any help would be appreciate.
    Thanks,
    Swati

    actually it shouldn't give the null pointer exception and send the object to the server.
    I am not able to get, why it is throwing the exception, even there is no class for debugging.

  • How to write JDBC code in a java thread? for network programming

    Hii guys, i am new to java network programming. I developed small swing application for stock controlling in a shop, so i need to run the database in a server. i try the peer to peer scenario, but the response is too late and the application get stuck. there i wl put my data base java class
    please help me for this, how can i change this java class to networked JDBC
    import com.mysql.jdbc.Connection;
    import java.sql.DriverManager;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.Statement;
    public class ConnectionSet {
    private String severIp = "localhost";
    private String severPort = "3306";
    private String userName = "root";
    private String password = "123";
    private ResultSet rs;
    public void setSeverIp(String Ip) {
    severIp = Ip;
    public void setSeverPort(String Port) {
    severPort = Port;
    public void SetUserName(String Name) {
    userName = Name;
    public void setPassword(String passWord) {
    password = passWord;
    public ResultSet getResult(String url) throws Exception {
    Class.forName("com.mysql.jdbc.Driver");
    Connection cc = (Connection) DriverManager.getConnection("jdbc:mysql://" + getSeverIp() + ":" + getSeverPort() + "/suriyalanka", getUserName(), getPassword());
    Statement s = cc.createStatement();
    rs = s.executeQuery(url);
    // java.sql.ResultSet rs = (ResultSet) DriverManager.getConnection("jdbc:mysql://"+getSeverIp()+":"+getSeverPort()+"/suriyalanka",getUserName(), getPassword()).createStatement().executeQuery(url);
    return rs;
    public Connection getConnection() throws Exception {
    Class.forName("com.mysql.jdbc.Driver");
    Connection cc = (Connection) DriverManager.getConnection("jdbc:mysql://" + getSeverIp() + ":" + getSeverPort() + "/suriyalanka", getUserName(), getPassword());
    return cc;
    public void setResult(String url) throws Exception {
    Class.forName("com.mysql.jdbc.Driver");
    Connection cc = (Connection) DriverManager.getConnection("jdbc:mysql://" + getSeverIp() + ":" + getSeverPort() + "/suriyalanka", getUserName(), getPassword());
    Statement s = (Statement) cc.createStatement();
    s.executeUpdate(url);
    public String getSeverIp() {
    return severIp;
    public String getSeverPort() {
    return severPort;
    public String getUserName() {
    return userName;
    public String getPassword() {
    return password;
    please help me for this, how can i change this java class to networked JDBC
    Edited by: 798670 on Sep 29, 2010 6:04 AM

    Have you verified that your mysql allows network connections?
    In order to allow network connections you have to comment or remove line "skip-networking" in my.ini(windows) or my.cnf(unix) configuration files of your mysql instance.
    Or if you have the mysql administrator installed
    MySQL Administrator / Startup Variables / Disable networking (uncheck)
    By!

  • Network Programming exam papers (college exam papers)

    hello.
    my name is james mcfadden and i am a final year (4th year) undergraduate computing student at Letterkenny Institute of Technology. my e-mail address is [email protected] I have a question here for you. Would you have links to online versions of final year undergraduate Computing exam papers, specifically Networked Applications Development and or Network Management exam papers? I was only able to get access to Trinity College Dublin�s exam papers and Letterkenny IT�s exam papers.
    The 2005/06 academic year is the 1st academic year that final year undergraduate computing students at Letterkenny IT are being taught how to continue doing network programming in Java. i was taught how to do simple network programs in Java when I was in 3rd year.
    The name of the network programming subject that I�m doing in 4th year is Network Programming for Broadband Systems. It is divided into 2 parts: Programming and Networks. In past exam papers (C++ papers), a student would have had to answer 4 out of 6 questions. There would�ve been 4 programming questions and 2 networking questions on those papers. It is going to be the same for both the Summer and Autumn 2007 Broadband Network Programming exam papers, apart from fact that they will be Java papers and that a lot of the material that I have learned is new.
    In 4th year I did Multicast Sockets, Threads, Non-Blocking I/O, Remote Method Invocation, Protocol Handlers, and Content Handlers for the Programming part of the subject (Java Network Programming, 3rd Edition, by Elliote Rusty Harold).
    I did Network Security and Network Management for the Networks part of the subject (Computer Networking : A Top-Down Approach Featuring The Internet, 3rd Edition, by James F. Kurose and Keith W. Ross).
    Your help is greatly appreciated.
    Thank you.

    I have a question here for you.
    Would you have links to online versions of final year
    undergraduate Computing exam papers, specifically
    Networked Applications Development and or Network
    Management exam papers? No

  • Java network

    hi
    I want to know more about java network programming.
    Please tell me where can i get it.

    It's not avaiable in amazon, yes?
    http://www.amazon.com/exec/obidos/ASIN/1565928709/qid=1006521569/sr=2-1/ref=sr_2_15_1/102-2665779-0587340
    btw, have you seen the custom networking trail in the java tutorial?

  • Network programming book

    Hi friends,
    I want to know about a book related to "Multicast and multi-homing" network programming in java.
    Thanks
    Ghouse

    I would suggest you look at Java Network Programming on Amazon.
    To repeat a previous posting, you cannot multicast over the internet.
    Multi-homing is and old approach to using a PC as a firewall. The PC has two network cards and passes packets back and forth based on filtering rules. Is this what you are looking for? Why wouldn't use use a firewall applicance which is probibly cheaper?

  • External and Advanced Java program???

    Hi Experts,
      In what situation we come across to write an External and advanced Java program for lookups into target database tables, used adapter channel API. And later this program is used for lookups only when (condition) Interface quality of service (QoS) is Exactly Once
    Thnx
    Andy

    Sorry: what is the questione here?

Maybe you are looking for

  • Understanding aspect ratio after a year

    So it's been a year since I started learning FCP and among the kazillion things I don't understand, the one I most need to finally get clear about is a aspect ratio phenomenon with my setup, and all projects I've done so far. I am still viewing my wo

  • Error Data Exporting to Excel sheet

    Hi Experts, webdynpro application , i am trying to export data to excel sheet which is coming from R3 system. it is working for 500 users but when i am trying to export more than 500 users it is showing problem. regards pavan

  • I need information on this Object

    Hi, can one help me in this object.                 On a monthly basis, after all data has been fed into One Source and the monthly One Source calculations have been performed, an extract will be run from One Source , converted via XI and loaded to B

  • Set custom page size for printing

    I want to set a custom page size for printing some PDF three and four-page musical scores to roll paper on an Epson 1290 using Adobe Reader 9.3.4 on Ubuntu 10.04. The printer properties in the print dialog has a media size option, and one of the choi

  • Using U3 on MacBook?

    I am trying to use a Sandisk U3 drive to run Parallels on my Macbook, I can put programs on the drive (using it as an external drive) but not able to run the programs from the U3 as you would on a pc, anyone out there that can give me help? Maybe its