Socket question

Ok, I have a very bizarre problem with a client/server program. For an interim service while waiting for my Cable internet to get installed I was using aol (free trial, naturally) and remote computers were able to connect fine to the server on my computer. Now that I have cable (there is no router connected) the client program cant connect (remotely) to the server. The server program works if on an outside computer not on this internet service. There is no other reason than to believe this is a problem with the internet service itself, since its not my computer since it works, and still works, through aol. Yet this internet service (comcast) says they dont block ports? But is there any other explaination??
Please help, I'm tearing my hair out.

Sounds like a perfectly ordinary network configuration problem to me. Can the client machine ping the server? Can it telnet to the server? All the usual things you try when your network doesn't network the way you want.

Similar Messages

  • What is better???--sockets question

    I have a server that receives one client (one thread of them) per socket.
    Is it better to have all in the same socket?
    where is the bottle�s neck? in the processor or in the bandwith?

    ok
    and what is better for my server:
    1) receive each client in a different socket
    2)receive all clients in one socketAFAIK you would need a new port for each server socket. How then can your clients know which port to connect too? Therefore I think (2) is the proper solution.
    For a general implementation of a tcp server, have a look at my solution at http://www.ebi.ac.uk/~kirsch/monq-doc/monq/net/TcpServer.html . You can download the code by following the link at the bottom of that page. Comments/questions welcome.
    Harald.

  • Java Socket Question

    Bonjour all,
    I have a bit of a weird question about Socket output and input streams, when I use the following code everything works fine.
    Socket soc = new Socket("123.456.789.1", 1234);
    +//     Send data request+
    +DataOutputStream dos = new DataOutputStream(soc.getOutputStream());
    dos.writeInt(INT);
    dos.flush();
    +//     Wait for reply+
    ObjectInputStream ois = new ObjectInputStream(soc.getInputStream());
    ArrayList<String> files = (ArrayList<String>) ois.readObject();
    How ever if I declare my Output and Input Stream readers together, my program justs hangs.
    Socket soc = new Socket("123.456.789.1", 1234);
    +//     Define streams+
    DataOutputStream dos = new DataOutputStream(soc.getOutputStream());
    ObjectInputStream ois = new ObjectInputStream(soc.getInputStream());
    +//     Send data request+
    dos.writeInt(INT);
    dos.flush();
    +//     Wait for reply+
    ArrayList<String> files = (ArrayList<String>) ois.readObject();
    Anyone got any ideas why this is??
    Edited by: 836869 on 15-Feb-2011 04:02

    You have to flush your ObjectOputStream first, it is worth noting that you are not, 1) using an ObjectOutputStream, 2) flushing it before opening the ObjectInputStream.
    Try this.
    ObjectOutputStream oos = new ObjectOutputStream(soc.getOutputStream());
    oos.flush();
    ObjectInputStream ois = new ObjectInputStream(soc.getInputStream());If you want to swap an integer as part of the header, you can do the following.
    ObjectOutputStream oos = new ObjectOutputStream(soc.getOutputStream());
    oos.writeObject(INT);
    oos.flush();
    ObjectInputStream ois = new ObjectInputStream(soc.getInputStream());
    Integer intValue = (integer) ois.readObject();

  • Z97S Krait Edition CPU Socket Question

    Hi, I'm wondering whether the socket backplate on the reverse side of the the board is insulated. So far I have been unable to find any specific information online - although it seems that some ASUS products come with this as a protective feature. I'm just wondering whether this comes as a default for all socket 1150 boards. The reason I'm asking is because I am concerned that this item may come into contact with the chassis of my case and would like some peace of mind on this matter.
    I've attached a photo of the item in question - the silver socket behind the X shaped backplate (btw this is not a actual photo of my motherboard).
    Cheers

    the image isn't show up, you have to add tag in your post to show it
    ie:
     edit your post, then choose "Attachments and other options"
    then select desire placement/location in your reply and click on
    [Insert Attachment 1 in the message]
    [Insert Attachment 2 in the message]
    or use direct tags in your message to access the attached files with:
    Code: [Select]
    [_attachthumb=1]
    [_attachthumb=2]
    without "_" in front

  • Hub/Socket question

    Just ordered an upgrade from old BT broadband to Infinity 2 and a question occurs to me. Sales person arranged for an enginer to come out to (I think) do something to the socket. Does the Infinity Hub have to be pluged into a specific socket or will anyone do?
    I ask at the hub is plugged into a socket in the study which is a faff to get to so if the engineer needs to get to it I'll have to do some furniture moving before they get here.
    Any assistance appreciated.

    Hi Randor and welcome
    Please have a read if this - http://bt.custhelp.com/app/answers/detail/a_id/13736/c/346 as this answers everything you've asked.
    -+-No longer a forum member-+-

  • Client Server Socket question!

    Hello all,
    how are ye.
    I would like to ask a question.
    I would be graterful for any suggestions relating to my query.
    i am creating a program that needs to communicate over a network
    it has two parts
    P1) sends request to the other program mainly about account information and
    also updates.
    P2) the second part among other things listens for messages on a port from Program One.
    but also must be able to interface with the user who is using Program Two, the user should be able
    to view account info update delete search etc.
    my problem is how will i get the second program todo both operations do i need
    to create another thread that listens and if i do this. will i be able to
    like add info to a database from this thread.
    Mainly i need suggestion as to how i should implement a scenario like the above.
    I am sorry if i havent spelled out my problem in a clear manner.
    Very grateful for any assistance.
    Thank you all :-)

    http://java.sun.com/developer/onlineTraining/Programming/BasicJava2/socket.html
    That should help you out.

  • Flex 3 Beta 2 Socket question

    Hi,
    Last night I spent about 3 hours looking for problem which
    came up for me yesterday. Before I'll get back to writing sample
    app which tell me if there is a problem in my code I will ask if
    anyone has noticed this behaviour.
    I'm connecting to c# socket with Socket class. First message
    goes nicely. But when I'm trying to write next messages nothing
    happends. Messages from socket are coming all the time. The problem
    is only with writing.
    I'm using writeUTFBytes method to write. RIght after writing
    I'm executing flush() n socket.
    Is it possible it is the problem with Flex Socket in 3 Beta
    2?

    in
    http://bugs.adobe.com/jira/browse/FB-9947
    it is remarked that re-establishing an internet connection resolves
    the issue, but it DOES NOT!
    I still get the
    'Flex Builder cannot access the server containing the Start
    Page content.
    If you are offline, try connecting to the network and
    refreshing the Start Page.' message.
    Andy

  • Unix Domain Socket - Question about work around

    Since Unix Domain Sockets are platform dependent and Java is platform independent, it does not support it.
    However, I am sure some of you have worked with them and found some good work around.
    Elsewhere Jtux was suggested as a possible fix. However, I have not seen any good testimonials to it working. Also, if there are any security issues with this software. The website is here: http://www.basepath.com/aup/jtux/
    Does anyone have any other suggest?
    Thanks.

    I am modifying a current app. I must use the Unix
    Domain Sockets. I have no choice in the matters. It's
    for security reasons that they must be left in place.I can only guess that you do not understand my suggestion.
    The proxy does a domain socket to regular socket - just a pass through. You write this in C/C++.
    In your java app, as one option, you use Runtime.exec() to start the proxy. Then you use a java socket to connect to it. You can pass options to the proxy to control the socket behavior on both ends.
    In terms of usage there are a number of variations on the above.

  • Java Sockets Question

    Hi Guys,
    I've got a problem. I'm using raw socket connections for Web and other queries. I know I can use URLConnect and similar but they do not provide the flexiblity that I need so please do not suggest that I use those isntead.
    My problem is that I can set the read timeout (socket.setSoTimeout) and I can set the write timeout (socket.setLingerTimeout) but I there does not appear to be a setting to set the connection timeout.
    I'm using this for proxy servers, and the proxy servers tend to die quite often and when I try to connect to a server that no longer works the connection request just sits there forever, never actually times out. Now, the timeouts work fine on the read/write but not on the connection.
    I know I can create another thread that's a timer and force close the socket thread but that doesn't seem like the proper way to do it.
    Thanks,

    Great. Thanks, Played with that overloaded constructor and finally got it to work under linux. The funny thing is it wouldn't work under windows when I was testing because windows uses its own timeout.

  • Simple Socket Question / Error...

    I'm testing out a socket connection for an RDP app on the playbook.
    Flash Builder Burrito 4.5
    Adobe AIR SDK 2.5 Hero
    Playbook SDK 0.9.2
    Playbook Sim 0.9.2
    VMPlayer running in Bridged Networking mode
    public function RDPApp()
                   var socket:Socket = new Socket();
                   socket.addEventListener(Event.CONNECT, onConnect);
                   socket.addEventListener(IOErrorEvent.IO_ERROR, onIOError);
                   socket.addEventListener(Event.CLOSE, onClose);
                   socket.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onSecurityError);
                   socket.addEventListener(ProgressEvent.SOCKET_DATA, onReceivedData);
                   socket.connect("http://www.google.com", 80);
                   socket.close();
                   stage.nativeWindow.visible = true;
              private function closeWindow(event:MouseEvent):void{
                   stage.nativeWindow.close();
              protected function onConnect(event:Event):void
                   // TODO Auto-generated method stub
              protected function onIOError(event:IOErrorEvent):void
                   trace(event);
              protected function onClose(event:Event):void
                   // TODO Auto-generated method stub
              protected function onSecurityError(event:SecurityErrorEvent):void
                   // TODO Auto-generated method stub
              protected function onReceivedData(event:ProgressEvent):void
                   // TODO Auto-generated method stub
    The code above throws on the sim and on the desktop:
    IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2031: Socket Error. URL:http://www.google.com" errorID=2031]
    Googling this error message indicates that the client flash app has not received the required policy file from the server.
    I was under the impression that AIR apps running on the desktop sandbox (Playbook included) do not require the retrieval of the policy file.
    Any help is much appreciated.
    Matt

    For sockets you need to first load the securitypolicy file then call methods on it.
    ref : http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/Socket.html
    Message was edited by: saisri2k2

  • Basic socket question

    I'm doing following in my code..
    socket = new Socket("my machine's IP address", 1779)it keeps throwing me exception saying "connection refused". Do I need to make any changes on my machine so that it allows my program connect to that specific port? That port number is not used by any other application and my system is windows 2000.
    Plz advice..

    plz dont reply..i think i'm fool :) ..figured it out why it wasnt workiong..and no i'm not gonna say it :)

  • Sockets question (multiple user, client-server application)

    I'm new to sockets and I think I've been designing my application all wrong.
    I've been using the KKMultiServer example from this website. It creates new threads using the Socket.accept() function. However, all the clients connect to the same port on the server.
    What I'm creating is a multi-user TicTacToe program. So far it's only for two players, but I would like to create a game "lobby" where lots of users can connect and play games with each other.
    Do I need to specifcy local ports for the clients that are connecting? Should I be using different ports on the server for each user so the traffic doesn't get mixed up?

    a socket is made up of 4 elements.
    1) the server or host IP address
    2) the server port
    3) the client IP address
    4) the client port
    for a socket to be unqiue one of these elements must be different.
    to make these unique client sockets use a port assigned by the OS and so you can have more than one client connected to a server and 1 client machine can have more than 1 open socket.
    here is a print out from netstat (an IP utility on windows that shows some of my open sockets...
    Active Connections
    Proto Local Address Foreign Address State
    TCP CHEF2:1033 CHEF2:3306 ESTABLISHED
    TCP CHEF2:3306 CHEF2:1033 ESTABLISHED
    TCP CHEF2:3306 CHEF2:3626 ESTABLISHED
    TCP CHEF2:3306 CHEF2:3743 ESTABLISHED
    TCP CHEF2:3626 CHEF2:3306 ESTABLISHED
    TCP CHEF2:3743 CHEF2:3306 ESTABLISHED
    TCP CHEF2:1278 216.71.131.122:22 ESTABLISHED
    TCP CHEF2:1694 kw40.primenetwork.net:http CLOSE_WAIT
    TCP CHEF2:1863 67.72.120.62:http CLOSE_WAIT
    TCP CHEF2:1869 host16.ipowerweb.com:http TIME_WAIT
    TCP CHEF2:1870 host16.ipowerweb.com:http TIME_WAIT
    TCP CHEF2:1871 host16.ipowerweb.com:http TIME_WAIT
    TCP CHEF2:1872 host16.ipowerweb.com:http TIME_WAIT
    TCP CHEF2:1875 host16.ipowerweb.com:http TIME_WAIT
    TCP CHEF2:1881 host16.ipowerweb.com:http TIME_WAIT
    TCP CHEF2:1884 host16.ipowerweb.com:http TIME_WAIT
    TCP CHEF2:3623 216.71.131.122:ftp CLOSE_WAIT
    TCP CHEF2:3841 CARTMAN:netbios-ssn ESTABLISHED
    at any rate
    notice how on my machine (CHEF2) i have a service running on port 3306. i also have three sockets open from my machine acting as a client to the service. you can see it lists these three open sockets to my machine twice each.
    at any rate it can tell them all apart from the server end because the port used by the client is different.
    to sum up this and the answer given above you don't have to worry about it.

  • Socket question related

    Hi all!
    I would like know if exists a way to determinate wich ip address i'll use to connect on a remote machine situated out of my lan where application will run.
    Example:
    Socket socket   = new Socket("some.host.net", 4444);
    String local_ip = socket.getLocalAddress().getHostAddress(); //Will be 192.1.1.1 (lan ip)
    //...Router ip is for example 212.121.5.6 (a pubblic ip)
    Whic is the way (if there is any) to know the router ip by my java app??
    Thanks for any help!

    No sorry, i try to explain better now.
    I have a client into a lan where my app run and talk with a remote server.
    I cant manipulate server application, just use it.
    I need to know by client application wich ip i use to connect on the server.
    The client address is for example 192.168.1 (lan address) and the gateway address is 212.213.215 (public ip)
    The server application will receive request from 212.213.215
    I need to know the getaway ip (which ip will connect on the server).
    Hope i explained better now

  • Please help. Simple Socket Question

    Hi. I am writing the basics for a game. Simple. I have a few classes, 1 of which is for connecting and another in which each user inherits a new copy as they join, it contains all their personal variables.
    By having their socket address, how can I access a specific instance of that file?
    Thanks for any help.

    Hi. I am writing the basics for a game. Simple. I
    have a few classes, 1 of which is for connecting and
    another in which each user inherits a new copy as
    they join, it contains all their personal variables.
    By having their socket address, how can I access a
    specific instance of that file?Specific instance of what file? Sockets connect processes to other processes, not to files.

  • My last (hopefully) socket question...

    Hi,
    thanks to the people who helped me get my sockets up and running. I got pointed in the right direction (when I was convinced something else was the problem) and now I fixed my bug. So, now when I receive things over the socket, I always receive the same thing. On the sender side I am printing out what I am sending. The receiver prints out what it receives. The receiver is always printing out the first thing it received, even though the sender has claimed to send something newer. This goes on and on. The sender always prints out that it is sending something new, yet what the receiver prints out is what it read the first time.
    Is there some flushing of the object input stream that I need to do? I tried setting ois.enableResolveObject(true) but my compiler tells me that method has protected access, so I must not be able to call it.
    For reference, here is my receiver code:
    ArrayList remoteEvents = null;
    while (running) {
            remoteEvents = null;
            remoteEvents = (ArrayList)ois.readObject();
            while (remoteEvents == null) {
              remoteEvents = (ArrayList)ois.readObject();
            for(int index=0; index < remoteEvents.size(); index++) {
              System.out.println("receiving event " + ((SimEvent)remoteEvents.get(index)));
            addRemoteEvents(remoteEvents);
    }Any ideas?
    Thanks.

    Ok, here is some more of the code. I tried clearing the ArrayList each time before calling readObject() and now I am thoroughly confused again. If I clear the ArrayList then nothing is received over the socket, i.e. the ArrayList received has size() == 0. If I don't clear the ArrayList then I continually receive the same thing that was sent the first time. Here's the code:
    ArrayList remoteEvents = new ArrayList();
    while (running) {
            remoteEvents.clear();  //causes empty ArrayList to be received
            remoteEvents = null;
            remoteEvents = (ArrayList)ois.readObject();
            while (remoteEvents == null) {
              remoteEvents = (ArrayList)ois.readObject();
            for(int index=0; index < remoteEvents.size(); index++) {
              System.out.println("receiving event " + (SimEvent)remoteEvents.get(index));
            addRemoteEvents(remoteEvents);
    }Just for reference, here is the sender code:
    for(int index=0; index < msg_queue.size(); index++) {
            System.out.println("sending event " + (SimEvent)msg_queue.get(index));
          //now send msg_queue over the socket
          ConnectionObject co = (ConnectionObject)peerSockets.get(machine);
          try {
            co.oos.writeObject(msg_queue);
            co.oos.flush();
          } catch (Exception e) {
            System.err.println("error writing messages to machine " + machine);
            System.err.println(e.getMessage());
            e.printStackTrace();
            System.exit(-1);
    }Any hints on why the clear() on the ArrayList would cause such a difference in behavior would be appreciated.
    Thanks.

  • Newbie Sockets Question

    Hi - I'm new to Java and have been trying to create a class to encapsulate socket communication. It doesn't work and I don't understand why?
    As I figure I've created and instance of SocketCommunication, called SetUpSocket (which works) and then called SocketSend to work on the mySocket instance. But my server never receives anything...
    What am I doing wrong?
    =================================================================
    public class SocketTester {
        public SocketTester() {
        public static void main(String[] args) {
            SocketCommunication mySocket = new SocketCommunication("localhost", 4000, 4001);
            mySocket .SetUpSocket();
            String strReceived = mySocket .doSend("HELLO");
            System.out.print(strReceived);
    =================================================================
    import java.util.*;
    import java.io.*;
    import java.net.*;
    public class SocketCommunication {
        private Socket inClient;
        private Socket outClient;
        private BufferedReader socketReader;
        private PrintWriter socketWriter;
        private String host;
        private int outPort;
        private int inPort;
        public SocketCommunication(String host, int outPort, int inPort) {
            this.host = host;
            this.outPort = outPort;
            this.inPort = inPort;
        public boolean SetUpSocket(){
            try {
                outClient = new Socket(host, outPort);
                outClient.setKeepAlive(true);
                socketWriter = new PrintWriter(outClient.getOutputStream());
                inClient = new Socket(host, inPort);
                inClient.setKeepAlive(true);
                socketReader = new BufferedReader(new InputStreamReader(inClient.getInputStream()));
            } catch (UnknownHostException e) {
                System.out.println("Error setting up socket connection: unknown host " + host );
                return false;
            } catch (IOException e) {
                System.out.println("Error setting up socket connection: " + e);
                return false;
            return true;
        public String doSend(String sendString) {
            String receiveString = null;
            try{
                socketWriter.print(sendString);
                socketWriter.flush();
                receiveString = getData(socketReader);
                if (null == receiveString) {
                    System.out.println("no response");
            } catch (IOException e) {
                System.out.println("Error communicating: " + e);
            //receiveString = "test";
            return receiveString;
        public String getData(BufferedReader in) throws IOException {
            int iIncomingCharacter;
            StringBuffer sbMsgBuilder = new StringBuffer();
            String sMsg = null;
            while ( true ) {
                // Read character
                iIncomingCharacter = in.read();
                if ((iIncomingCharacter) == -1) {
                    sMsg = "-1";
                    break;
                // Append character to buffer
                sbMsgBuilder.append((char) iIncomingCharacter);
                // Test to see if "$END$\n" has been received
                if ((sbMsgBuilder.length()>6) && (sbMsgBuilder.substring(sbMsgBuilder.length()-6).equals("$END$\n"))) {
                    // Convert buffer to string
                    sMsg = sbMsgBuilder.toString();
                    // Reset the buffer for next message
                    sbMsgBuilder.delete(0,sbMsgBuilder.length());
                    break;
            return sMsg;
    =================================================================

    >>>
    Connecting of course requires something toconnect
    "to".Indeed.
    So are you saying ServerSocket is required?
    I don't use ServerSocket when I connect to a
    database. But there is still something to connect
    "to".Yes, I know.
    I'm talking specifically about the OP's case of Java talking to Java.
    But in java you would need to use a server of some
    sort although (guessing) for nio you need
    ServerSocketChannel rather than ServerSocket. Still
    a server though.I suspected as much. I just didn't know for certain that Socket didn't have a method to allow it to fullfil ServerSocket's role in some capacity. I wouldn't expect it, but I didn't know for sure and couldn't be bothered to check. I didn't look that closely at the OP's code and didn't want to send him off with bad advice if he was just doing something that was legit but outside my own knowledge.

Maybe you are looking for

  • Help with two computers, two accounts on one apple tv

    I'm about ready to pull the trigger on an apple tv to add to my building home theater system. My biggest desire in getting the apple tv is mainly for music streaming to my speaker system. So here is my question. My wife and I both have our own separa

  • Problem playing back a song just downloaded from iTunes

    hey everyone, i just downloaded the Joss Stone Tell Me 'Bout It (A Yam Who? Rework) - EP and there is a problem with the radio edit of the song whenever i play it, it plays to the 16th second, and then it goes to the next song, but if i fast forward,

  • Best way of using exp/imp

    Dear all, I wanted to migrate database from 8i to 11g(8.1.5 to 11.1.0). I am going for exp/imp method. Which is the best method of doing this task? I mean Full export and Import Or Schemawise export and import? Is there any chances of missing objects

  • Burn iso doesn't work.

    Hi, I did download the 4 files iso.zip for me to upgrade from solaris 9 to solaris 10. I am using nero to burn. Before burning I did unzip them. whenever I unzip, it creates a file like xxx.iso.iso. I did put it into my 220R sparc machine and keeps o

  • HR Data Transfer Toolbox

    Hi, I am trying to create employee record in HR module using HR Data Transfer Toolbox. But when I typed in transaction code ZBPHR_ZDTT, the error came out that transaction doesn't exist. Can anyone tell me how I can get into this toolbox? Thank you i