WAN / Internet application using sockets

I m making an application which will work on Internet / WAN using sockets.
Now when I want to communicate (e.g. sending a string ) from one node to another over the internet using UDP, it is successfully send.
When I do the same using TCP, there's a CONNECTION RESET exception on the SERVER end. (Client gets the stream in this case)
Some of the other important things are.
- One node is having public IP. (I confirm it by comparing it with www.whatismyip.com)
- The other node is, I THINK is private IP, (Behind NAT) (I confirm it by comparing it with www.whatismyip.com)
UDP works fine if anyone of them is sender or receiver. (Both can send and receive UDP Packets)
Then why TCP is not working??? theoratically, it should !!!
Is there any firewall issue???
Is there any NAT issue???
Plz Answer !!!

You are quite to build a proxy server :)
Sockets in java are implemented by SocketServer and Socket class in java.net package. Other useful classes for ip address manipulation are InetAddress and InetSocketAddress. I hope this answer to your first question.
To answer to your second question I think the simplest way is to design the program to act as a proxy server. The main reason is due to the fact that browsers or other internet application could interact easyly with a proxy and there are clear specification of about it works.
The concept is that a client application connects (using sockets) to a server program (your proxy) that redirects the request to the real url. Having control of socket streams it could act in some ways to:
1) allow o deny internet access.
2) measure time.
3) filter connection requests to a black listed sites.
It's hard to explain all technical details here... but you can found sorce code of Open Source implementation at http://sourceforge.net/projects/wpg-proxy/ for a HTTP proxy server and http://jsocks.sourceforge.net/ for a socket proxy. You could start from here to implement your own server.

Similar Messages

  • Client/server application using sockets

    Hi there,
    I'm trying to create a client/server application using sockets where the client has a GUI of a membership application form for some sort of club. Basically, the user will enter their name, address, membership no. etc in to various Jtext fields and then press a JButton to submit these details to the server. The server will then hopefully just dump these details to a text file.
    Can anyone give me any examples, ideas on how to start, links etc.
    Thanks v. much in anticipation,
    Nick

    Take a browse of the tutorial on sockets: http://java.sun.com/docs/books/tutorial/networking/sockets/clientServer.html

  • Are there any Client/Server Application (using sockets) design patterns?

    Hi,
    The title of the post nearly says it all. I am searching for different design patterns related with the development of a client/server application. I understand that there must be any different ways on how a client/server application can be developed.
    Regards,
    Sim085
    Disclaimer:
    When I enter in the Socket forum on this site I recieve this message "Thank you for any participation in this forum. Due to a lack of relevant activity, we have decided to archive this forum on June 16, 2006. For future posts on this topic, we suggest you use the Networking forum" and I am not allowed to create a new post! However I can see posts done yesterday! All i did is add the forum in 'my forums'. Does this happen to you people as well?

    Hi Sim085...How are you?
    So look this:
    http://forum.java.sun.com/thread.jspa?threadID=5148926&tstart=75
    I don�t know if is what you want...but I hope in this^^
    Ok man...If you have one example for help you is better.
    [ ]

  • IAB Studio is a new J2EE based Rich Internet Application builder

    Here I would like to introduce a new J2EE based solution for the development of Rich Internet Allications.
    We are pleased to announce a new release of IAB Studio 3.1. This innovative development solution for Rich Internet Application Development is now available for free download from our web site www.worcsnet.com > Products > Downloads.
    Please check out a demo application at www.iabstudio.com to see the power of IAB Studio for yourself. This application was created in just 5 days. Yet it delivers rich functionality and user friendly user interface.
    ****** no HTML, no page refreshes, no Applets, no ActiveX, no Plug-ins, no server side development******
    IAB Studio is a breakthrough alternative to the leading mainstream of web development tools or frameworks, such as .NET, Struts, or Flash. It allows for getting rid of server side development, which normally cannot produce a decent functional GUI. In IAB Studio, a developer builds internet applications using client side controls (also known as widgets), which are extremely powerful and can handle data and functionality associated with them. IAB Studio widget collection includes treeview controls, tab controls, data management and reporting controls, data presentation control (grid), report controls, combo box, toolbars, menus, media controls and many more.
    ****** Create a functional Graphical User Interfaces in no time ******
    IAB Studio is the first tool ever, which allows a web developer to forget about spending tremendous amounts of time developing any GUI and concentrate on the business logic, the same way as in Visual Basic or any other desktop RAD tool. In fact, it is equally easy to use. It comes with a powerful in-browser IDE, which contains Team Organizer, Project Organizer, Data Entry Automation Wizards, Instant Messenger, Visual Page Designer, Visual Workflow Designer, Data Management and Visual Report Designer.
    ****** Does not require learning new programming languages ******
    To use IAB Studio, a developer does not have to learn any new language. Basic knowledge of Java and JavaScript is enough to start developing complex applications right away.
    ****** It is FREE ******
    IAB Studio is completely free for non-commercial use.
    ****** Most Powerful in-Brower Development Environment******
    IAB Studio is compatible with the major operating systems (Windows/Unix) and a wide range of RDBMS such as Oracle, MS SQL Server, Sybase or SAP DB. No other tools except a Web browser are required to use IAB Studio.
    ****** Data Entry Automation ******
    IAB Studio allows one to automate tedious tasks as data entry. Instead of HTML forms and all the hassles related to handling them, IAB Studio provides data entry wizards, updateable grid controls and data manipulation, and reporting controls. These controls provide you with the ability easily and quickly build functional data entry pages with error validations, automatic SQL generation, and more. It requires zero coding as well. Wizards make the most of work for you; there are no XML descriptors involved. This saves a lot of development time.
    ****** Benefits ******
    Applications developed in IAB Studio have superior performance, minimized network traffic, and an optimized data exchange mechanism between client and server. Minimum or ZERO coding is required in most cases to create Rich Internet Applications of any complexity with IAB Studio. Using IAB Studio, developers or even business analysts can create powerful Internet applications in days, with only a Web browser installed on the computer anywhere in the world. The bottom line is - it is easy to develop rich functionality in IAB Studio, and it takes up to 80% less efforts compared to the leading web development tools and frameworks.
    ****** IAB Studio Client Side Widgets ******
    IAB Studio offers a rich set of client side widgets that truly redefine the capabilities of a regular Web application. IAB Studio widgets are JavaScript graphical user interface objects backed by the Java MVC framework on the server side. IAB Studio does not use any Applets or ActiveX controls. WorcsNet technology offers the thinnest client possible, outstanding performance and rich functionality. Internet Applications created with IAB Studio perform better than applications created with the leading development technologies. IAB Studio supports both Internet Explorer and Netscape Navigator.
    ****** Remote Development ******
    IAB applications do not require deployment. A typical IAB application runs as part of the IAB Studio framework; this allows modification of the application on the fly. A team of developers can work on the same project remotely, simultaneously and in real time. The browser based Page Editors allow for development of IAB pages on the client machine and save the work in the server repository. It greatly simplifies the development and deployment processes.
    ****** Robust Security ******
    IAB Studio�s robust security allows the administrator to manage and authorize access to any areas of the application depending on the role of a user.
    Read more about IAB Studio at www.worcsnet.com.
    Check out a demo application at www.iabstudio.com to see the power of IAB Studio for yourself.

    Struts is a server side framework, which has poor means for creating web pages that can provide rich user interface.
    The main reason is that in order to refresh page data, it needs to refresh the whole page. It means that if for example you have two tab pages and you want to switch from one to another, you will refresh the current page, and everything you entered on this page will be lost. So in order to retrieve it when you go back to the first page, you will have to send it to the server in the first place, store itsomewhere and prepare a page when you go back to it. Another problem is that while you are on the second page, you cannot really access data from the first page - because it's not there.
    IAB Studio, on the other hand, is very different. It allows to create pages, which consists of client side controls and not HTML. Client side controls can handle data, assosiated with them. For example, in the abovementioned example, when you click on the second tab page, it will not go to the server. Instead, it will cache this page in memory and handle it accordingly. It also allows to get data from the first page, even if you are on the second page. And so on.
    IAB Studio has over 40 such controls, including reporting control (this one has a functional report designer), grids, treeview, tab controls, various lists,
    message boxes, schedulers, workflows and more.
    Another important difference is that Struts is just a framework, and you have to handle a lot of XML descriptors, whereas IAB Studio is a full-blown IDE, which requires only browser to run.
    Read more about IAB Studio at www.worcsnet.com, or you can download a free version and try it out for yourself.

  • Client & server can use different language when using socket for client/ser

    When building client/server applications using socket , is it that client and server do not need to use both Java as long as they implement the same networking protocol?
    Thanks a lot!

    thank you, DrClap!

  • How to share internet connection using socketserver?

    Hello guys is this possible? i want to share my internet connection programmaticaly using java for example i have a one computer that has internet connection and i want to run socketserver from the computer that has internet connection and share the internet connection to another computer that has no internet connection using socket how to do that in java?

    jhovarie wrote:
    Hello guys is this possible? i want to share my internet connection programmaticaly using java for example i have a one computer that has internet connection and i want to run socketserver from the computer that has internet connection and share the internet connection to another computer that has no internet connection using socket how to do that in java?No, this is mostly a admin (networking ) issue. if you want to do so, you require a router (switch), one end should be connected to internet connection, and then connect the rest of the computers to router. you will be able to access the internet.

  • Using Sockets TCP/IP to connect through Proxies and Firewalls

    How to do in a Client/server Application using Sockets TCP/IP to connect through Proxies and Firewalls?
    How to implement the HTTP Tunnelling in this case?
    the code in Client to connect to server is:
    SSLSocketFactory sslFact = (SSLSocketFactory)SSLSocketFactory.getDefault();
                   socket = (SSLSocket)sslFact.createSocket(c.site, c.PORT);
              String [] enabledCipher = socket.getSupportedCipherSuites ();     
                   socket.setEnabledCipherSuites (enabledCipher);
                   out = new ObjectOutputStream(socket.getOutputStream());
                   in = new ObjectInputStream(socket.getInputStream());
    The Server is an executable Standalone Application with a main Function � How to do to convert this Server in a Servlet Application?
    the code in Server to wait client connections is:
    Runtime.getRuntime().addShutdownHook(new ShutdownThread(this));
              try {
                   SSLServerSocketFactory factory = (ServerSocketFactory) SSLServerSocketFactory.getDefault();
                   SSLServerSocket sslIncoming =
                        (SSLServerSocket) factory.createServerSocket (PORT);
                   String [] enabledCipher = sslIncoming.getSupportedCipherSuites ();
                   sslIncoming.setEnabledCipherSuites (enabledCipher);
              while(running) {
                        SSLSocket s = (SSLSocket)sslIncoming.accept();
                   newUser(s, pauseSyn);
              } catch (IOException e) { System.out.println("Error: " + e); }
    some links or code sample?
    Thanks in Advance

    Did you see this: Networking Properties?
    Including
    SOCKS protocol support settings
    and
    http.proxyHost (default: <none>)
    http.proxyPort (default: 80 if http.proxyHost specified)
    http.nonProxyHosts (default: <none>
    ftp.proxyHost (default: <none>)
    ftp.proxyPort (default: 80 if ftp.proxyHost specified)
    ftp.nonProxyHosts (default: <none>)

  • Two applications wants to read on the same port using Socket

    I have an application running on one machine using TCP/IP socket. The data transfer with the other application on other machine is in ASCII.
    Now I want a new application that can have a copy of data received and sent on the given port, where the previous application is running.
    Is it possible in Java using socket and TCP/IP to have two application reading data from the same port and both can read all the data.

    Even when you don't state the type of app which need to read the data stream (is it a server or a client app???), it's impossible to share a single TCP/IP socket among multiple apps.
    Perhaps the best thing to do is to develop something like a proxy server who listens on the nominated port and provides to contact (if your apps are server ones) or to be contacted (if your apps are client ones) by the desired apps.
    This way, the only job for the proxy is to duplicate the contents of the data stream and make them available to all the apps engaged.
    Hope this helps.

  • How do I get rid of the alert "(Java Scriprt Application)Type error: Text is undefined   I get it when I get a new Internet page using Firefow

    How do I get rid of the alert "(Java Scriprt Application)Type error: Text is undefined>  I get it when I get a new Internet page using Firefow

    I do not want to half to install things into my PC that i do not trust! I just want this gone and like i said Firefox should of given us the choice to add this and not forced us, because if there is no actual way to remove it then il be forced to remove Firefox till they either remove it or allow us to remove it!

  • Updated Firefox and now can't send messages in Facebook but can if I use other Internet Applications

    Since the update of Firefox, when I try to send messages to friends in Facebook I get an error message stating that "message failed to send". Have not been able to find a work around. Have cleared History (Cookies and Cache). Facebook messages work on our other laptop which has not been updated and if I use other Internet applications like IE, My Opera etc

    Hi,
    You can try updating Java to the latest (7u9) and restart Firefox: http://www.oracle.com/technetwork/java/javase/downloads/jre7u9-downloads-1859586.html
    Please make sure to choose either '''Windows x86 Offline''' or '''Windows x86 Online'''.
    If problems persist you can then reset Firefox and start afresh.
    The Reset Firefox feature can fix many issues by restoring Firefox to its factory default state while saving your essential information.
    Note: ''This will cause you to lose any Extensions, Open websites, and some Preferences.''
    To Reset Firefox do the following:
    #Go to Firefox > Help > Troubleshooting Information.
    #Click the "Reset Firefox" button.
    #Firefox will close and reset. After Firefox is done, it will show a window with the information that is imported. Click Finish.
    #Firefox will open with all factory defaults applied.
    Further information can be found in the [[Reset Firefox – easily fix most problems]] article.
    Did this fix your problems? Please report back to us!
    If you would like to take a listing of the add-ons, important preferences/settings etc. to quickly replicate the previous profile, please open '''Troubleshooting Information''' via '''Help''' ('''Alt''' + '''H'''), '''Copy all to clipboard''' and paste it into MS Office Excel, or OpenOffice/LibreOffice Calc, or notepad. However, it would be a good idea to check for the existence of the issue immediately after the reset.

  • Remote Application using Internet

    I was interested in knowing about viewing virtual instruments across the Internet
    from a Web browser. I plan to build such an application as a project for
    my study (M.S) using LabVIEW and JAVA. Do I need to have the Internet Toolkit
    for building such an application? The LabVIEW here at school is version
    5.1 and we have all the Java support here in the lab.
    Thanks,
    Joseph George,
    Graduate Assistant,
    Department of Electrical and Computer Engineering,
    University of Alabama at Birmingham.

    I would suggest you get a copy of Jeffrey Travis book "Internet Applications in
    LabVIEW". There are many ways to view or control LabVIEW VI's over the internet
    (built in functions in 5.1, ITK, VI server, ect.). The method you choose depends on
    the functionality that you want to allow. You can create web viewable VI's with
    LabVIEW 5.1, CGI scripting is easier with the Internet Developers Toolkit, Internet
    enabled control can be done with the VI server using client/server VI's. Get the
    book, it includes using Java as well as the methods listed above.
    Good Luck,
    Mark Derome
    M.I.T. Haystack Observatory
    Joseph George wrote:
    > I was interested in knowing about viewing virtual instruments across the Internet
    > from a Web browser. I plan to build such an application as a
    project for
    > my study (M.S) using LabVIEW and JAVA. Do I need to have the Internet Toolkit
    > for building such an application? The LabVIEW here at school is version
    > 5.1 and we have all the Java support here in the lab.
    >
    > Thanks,
    > Joseph George,
    > Graduate Assistant,
    > Department of Electrical and Computer Engineering,
    > University of Alabama at Birmingham.

  • Internet and applications using the Internet keep crashing after IOS5 upgrade on the iPod Touch 4th generation. Any suggestion on how to solve?

    Internet and applications using the Internet keep crashing after IOS5 upgrade on the iPod Touch 4th generation. Any suggestion on how to prevent the it?

    Try:
    http://snapguide.com/guides/calibrate-your-home-button/?utm_expid=69945963-15
    fix for Home button
    iPhone Home Button Not Working or Unresponsive? Try This Fix
    - If you have iOS 5 and later you can turn on Assistive Touch it add the Home and other buttons to the iPods screen. Settings>General>Accessibility>Assistive Touch
    - If not under warranty Apple will exchange your iPod for a refurbished one for:
    Apple - Support - iPod - Repair pricing
    You can do it an an Apple store by:
    Apple Retail Store - Genius Bar
    or sent it in to Apple. See:
    Apple - Support - iPod - Service FAQ
    - There are third-party places like the following that will repair the Home button. Google for more.
    iPhone Repair, Service & Parts: iPod Touch, iPad, MacBook Pro Screens

  • How to create the user on Internet Application Server(IAS) control console

    Hi All,
    My Client is asking me for How to create the user on Internet Application Server(IAS) control console 10.1.2( 10g release 2).
    If anyone have the document for How to Create the User on Internet Application Server (IAS) console 10g release 2 , then please send me the document and help me out from this Concern.
    Regards,
    Yadav@intelli.
    Edited by: 851080 on Apr 8, 2011 6:31 PM

    Are you using OID? Can you provide more details about your iAS environment?

  • Error while accessing Travel and Expense application using IE9

    Hi Experts,
    We are getting error while trying to access Travel And Expense applications using Internet Explorer 9.
    Error description---Sorry your browser/program is not supported by web dynpro.

    Hi Sanjeev,
    As of now webdynpro is supporting upto IE8 only. Even i too face the problem with IE 9 :(.
    Regards
    Srinivas

  • Error while accessing TE application using IE 9

    Hi Experts,
    We are getting error while trying to access Travel And Expense applications using Internet Explorer 9.
    Error description---Sorry your browser/program is not supported by web dynpro.

    Hi,
    Please refer the below links which could be helpful:
    Sorry, your browser/program is not supported by Web Dynpro -  IE 9 / Win 7
    /thread/274510 [original link is broken]
    Regards,
    Kiron Kumar T.

Maybe you are looking for