Should i create a client and a server socket in a same application

Greetings,
In which situation sould i have a server socket ? and in which situation should i have a client socket ?and in which situation should i have both?
I 'm making a app. who receives info (like alarms ) from a automation machine and also that same app. as a scheduler who send commands according to dates to the automation machine.
Now the automation machine is programmed like a socket tcp/ip server who is always on and the app. is a client.
Every time there's an alarm the machine sends me the info and i put it in a mysql database.
Every time there's an event programmed the app. sends a string to the machine.
The question is that i can't maintain that socket always connected, Sometimes disconnets.
I was thinking of making the change of creating in both sides a server and a client, so that, for example, in the app. the client woul d handle the event msgs and the server would accecpt connections with alarms from the automaition machine.
Since i'm a newbie in Java could somebody give me some tips, please?
Thanks

Thanks Peter....
But i already do that....
I have a thread who handles the connection management.
If by some reaseon the connection is lost the thread reconnects it.
My problem is that sometimes it reconnects every second, and i loose info provided by the automatian machine.
The best thing to have it would be a socket listener, but Java does have any.
Is there any API that does a socket listener?

Similar Messages

  • Can i run UDP  client and UDP  server socket program in the same pc ?

    hi all.
    when i execute my UDP client socket program and UDP server socket program in the same pc ,
    It's will shown the error msg :
    "Address already in use: Cannot bind"
    but if i run UDP client socket program in the remote pc and UDP server socket program run in local pc , it's will success.
    anybody know what's going on ?
    any help will be appreciated !

    bobby92 wrote:
    i have use a specified port for UDP server side , and for client define the server port "DatagramSocket clientSocket= new DatagramSocket(Server_PORT);"Why? The port you provide here is not the target port. It's the local port you listen on. That's only necessary when you want other hosts to connect to you (i.e. when you're acting as a server).
    The server should be using that constructor, the client should not be specifying a port.
    so when i start the udp server code to listen in local pc , then when i start UDP client code in local pc ,i will get the error "Address already in use: Cannot bind"Because your client tries to bind to the same port that the server already bound to.

  • Difference between oracle client and oracle server?

    Hi,
    could any one please tell me the difference between these things?
    1.)oracle client and oracle server
    2.) installtion of oracle client and oracle server
    Thanks in advance.

    Take a look at the general client - server computing model, described e.g. in this wiki.
    edit:
    corrected bad link
    Message was edited by:
    orafad

  • You should also create directories for and mount any other partitions

    Hi,
    I've downloaded archlinux-2012.12.01-dual.iso and wrote it to USB. I've booted from that USB and set up partititons using command cfdisk.
    /dev/sda5 ==> /boot
    /dev/sda6 ==> /
    /dev/sda7 ==> swap
    /dev/sda8 ==> /home
    I don't remember if I've created /mnt or if it was already there. I've created two directories: /mnt/boot and /mnt/home as per instructions:
    "https://wiki.archlinux.org/index.php/Installation_Guide
    Mount the partitions
    We now must mount the root partition on /mnt. You should also create directories for and mount any other partitions (/mnt/boot, /mnt/home, ...) if you want them to be detected by genfstab."
    I've mounted /dev/sda6 on /mnt
    and now there are no /mnt/boot and /mnt/home under the /mnt
    I don't understand what to do now because instructions state that I should create directories /mnt/boot and /mnt/home and mount them but now that I've mounted / on /mnt the /mnt/boot and /mnt/home are not available to mount partitions /dev/sda6 and /dev/sda8
    Regards

    mount /dev/sda6 /mnt
    mkdir /mnt/boot
    mount /dev/sda5 /mnt/boot
    Then do pacstrap etc. Add /home to fstab before you reboot.
    Alternatively you can mkdir /mnt/home and mount /sda8 there too, then genfstab will add the entry in fstab for it for you.
    Last edited by Mr.Elendig (2012-12-18 14:27:48)

  • How to send email to a SMTP server over a secure channel using STARTTLS setting of a send connector (Exchange and SMTP server are in the same domain)

    I’m trying to send email using exchange send connector STARTTLS setting to the SMTP server. I have read multiple documents on configuring TLS for send connector, but they talks about outbound connections to internet facing servers. My Exchange 2013 and SMTP
    server is in the same domain (let’s say A.com) and I’m creating dummy domains on my SMTP server (e.g.
    [email protected],
    [email protected] ) and their respective send connectors on the exchange server end. In the smart host section added the IP address of the SMTP server and in the scoping section added the SMTP domain address (e.g. dummy1.local ). In the FQDN field, added
    the FQDN of the exchange server 2013 which certificate is enabled with SMTP service.
    Could you tell me a step by step procedure, where I’m going wrong or any extra settings needs to added?
    Presently, it is giving me an error that 530 5.5.1 TLS encrypted connection is required.
    Note: I’ve created the Microsoft CA certificates for the SMTP and exchange servers and imported them in the personal certificate container. In which, the exchange certificate is created with FQDN name of the server and enabled for the SMTP service.
    I’m using OPENSSL certificate for making the SMTP server TLS enabled. (let me know, if I need to import the OPENSSL certificate anywhere on the exchange end)?
    Thanks!

    -IgnoreSTARTTLS is set to false on the send connector properties.
    I'm trying to established a HTTP over TLS connection. I'm not using mutual TLS between these two server.
    The send connector protocol logging is attached as below,
    2014-09-22T20:09:45.468Z,Exchange-SMTP send connector,08D1A4A14C7EDED5,2,10.219.3.74:24939,10.219.3.73:25,<,220 SMTP.A.local Welcome (MTA version),
    2014-09-22T20:09:45.546Z,Exchange-SMTP send connector,08D1A4A14C7EDED5,3,10.219.3.74:24939,10.219.3.73:25,>,EHLO Exchange.A.local,
    2014-09-22T20:09:45.624Z,Exchange-SMTP send connector,08D1A4A14C7EDED5,4,10.219.3.74:24939,10.219.3.73:25,<,250-SMTP.A.local Exchange.A.local OK,
    2014-09-22T20:09:45.624Z,Exchange-SMTP send connector,08D1A4A14C7EDED5,5,10.219.3.74:24939,10.219.3.73:25,<,250-SIZE,
    2014-09-22T20:09:45.624Z,Exchange-SMTP send connector,08D1A4A14C7EDED5,6,10.219.3.74:24939,10.219.3.73:25,<,250-8BITMIME,
    2014-09-22T20:09:45.624Z,Exchange-SMTP send connector,08D1A4A14C7EDED5,7,10.219.3.74:24939,10.219.3.73:25,<,250-BINARYMIME,
    2014-09-22T20:09:45.624Z,Exchange-SMTP send connector,08D1A4A14C7EDED5,8,10.219.3.74:24939,10.219.3.73:25,<,250-PIPELINING,
    2014-09-22T20:09:45.624Z,Exchange-SMTP send connector,08D1A4A14C7EDED5,9,10.219.3.74:24939,10.219.3.73:25,<,250-HELP,
    2014-09-22T20:09:45.624Z,Exchange-SMTP send connector,08D1A4A14C7EDED5,10,10.219.3.74:24939,10.219.3.73:25,<,250-DSN,
    2014-09-22T20:09:45.624Z,Exchange-SMTP send connector,08D1A4A14C7EDED5,11,10.219.3.74:24939,10.219.3.73:25,<,250-CHUNKING,
    2014-09-22T20:09:45.624Z,Exchange-SMTP send connector,08D1A4A14C7EDED5,12,10.219.3.74:24939,10.219.3.73:25,<,250-AUTH SCRAM-SHA-1 GSS-SPNEGO DIGEST-MD5 CRAM-MD5 NTLM,
    2014-09-22T20:09:45.624Z,Exchange-SMTP send connector,08D1A4A14C7EDED5,13,10.219.3.74:24939,10.219.3.73:25,<,250-AUTH=SCRAM-SHA-1 GSS-SPNEGO DIGEST-MD5 CRAM-MD5 NTLM,
    2014-09-22T20:09:45.624Z,Exchange-SMTP send connector,08D1A4A14C7EDED5,14,10.219.3.74:24939,10.219.3.73:25,<,250-STARTTLS,
    2014-09-22T20:09:45.624Z,Exchange-SMTP send connector,08D1A4A14C7EDED5,15,10.219.3.74:24939,10.219.3.73:25,<,250-DELIVERBY,
    2014-09-22T20:09:45.624Z,Exchange-SMTP send connector,08D1A4A14C7EDED5,16,10.219.3.74:24939,10.219.3.73:25,<,250-MT-PRIORITY,
    2014-09-22T20:09:45.640Z,Exchange-SMTP send connector,08D1A4A14C7EDED5,17,10.219.3.74:24939,10.219.3.73:25,<,250 ENHANCEDSTATUSCODES,
    2014-09-22T20:09:45.655Z,Exchange-SMTP send connector,08D1A4A14C7EDED5,18,10.219.3.74:24939,10.219.3.73:25,>,STARTTLS,
    2014-09-22T20:09:45.671Z,Exchange-SMTP send connector,08D1A4A14C7EDED5,19,10.219.3.74:24939,10.219.3.73:25,<,220 2.7.0 Ready to start TLS,
    2014-09-22T20:09:45.687Z,Exchange-SMTP send connector,08D1A4A14C7EDED5,20,10.219.3.74:24939,10.219.3.73:25,*,,Sending certificate
    2014-09-22T20:09:45.687Z,Exchange-SMTP send connector,08D1A4A14C7EDED5,21,10.219.3.74:24939,10.219.3.73:25,*,CN=Exchange.A.local,Certificate subject
    2014-09-22T20:09:45.687Z,Exchange-SMTP send connector,08D1A4A14C7EDED5,22,10.219.3.74:24939,10.219.3.73:25,*,"CN=DC-CA, DC=A, DC=local",Certificate issuer name
    2014-09-22T20:09:45.687Z,Exchange-SMTP send connector,08D1A4A14C7EDED5,23,10.219.3.74:24939,10.219.3.73:25,*,63E7E70100000000000B,Certificate serial number
    2014-09-22T20:09:45.687Z,Exchange-SMTP send connector,08D1A4A14C7EDED5,24,10.219.3.74:24939,10.219.3.73:25,*,CAEB1200CDF49715E5F2E4B8315EFDDC01F8F945,Certificate thumbprint
    2014-09-22T20:09:45.780Z,Exchange-SMTP send connector,08D1A4A14C7EDED5,25,10.219.3.74:24939,10.219.3.73:25,*,Exchange.A.local,Certificate alternate names
    2014-09-22T20:09:46.654Z,Exchange-SMTP send connector,08D1A4A14C7EDED5,26,10.219.3.74:24939,10.219.3.73:25,-,,Local
    2014-09-22T20:09:46.669Z,Exchange-SMTP send connector,08D1A4A14C7EDED6,0,,10.219.3.73:25,*,,attempting to connect
    2014-09-22T20:09:46.685Z,Exchange-SMTP send connector,08D1A4A14C7EDED6,1,10.219.3.74:24940,10.219.3.73:25,+,,
    2014-09-22T20:09:46.701Z,Exchange-SMTP send connector,08D1A4A14C7EDED6,2,10.219.3.74:24940,10.219.3.73:25,<,220 SMTP.A.local Welcome (MTA version),
    2014-09-22T20:09:46.701Z,Exchange-SMTP send connector,08D1A4A14C7EDED6,3,10.219.3.74:24940,10.219.3.73:25,>,EHLO Exchange.A.local,
    2014-09-22T20:09:46.716Z,Exchange-SMTP send connector,08D1A4A14C7EDED6,4,10.219.3.74:24940,10.219.3.73:25,<,250-SMTP.A.local Exchange.A.local OK,
    2014-09-22T20:09:46.716Z,Exchange-SMTP send connector,08D1A4A14C7EDED6,5,10.219.3.74:24940,10.219.3.73:25,<,250-SIZE,
    2014-09-22T20:09:46.716Z,Exchange-SMTP send connector,08D1A4A14C7EDED6,6,10.219.3.74:24940,10.219.3.73:25,<,250-8BITMIME,
    2014-09-22T20:09:46.716Z,Exchange-SMTP send connector,08D1A4A14C7EDED6,7,10.219.3.74:24940,10.219.3.73:25,<,250-BINARYMIME,
    2014-09-22T20:09:46.716Z,Exchange-SMTP send connector,08D1A4A14C7EDED6,8,10.219.3.74:24940,10.219.3.73:25,<,250-PIPELINING,
    2014-09-22T20:09:46.716Z,Exchange-SMTP send connector,08D1A4A14C7EDED6,9,10.219.3.74:24940,10.219.3.73:25,<,250-HELP,
    2014-09-22T20:09:46.716Z,Exchange-SMTP send connector,08D1A4A14C7EDED6,10,10.219.3.74:24940,10.219.3.73:25,<,250-DSN,
    2014-09-22T20:09:46.716Z,Exchange-SMTP send connector,08D1A4A14C7EDED6,11,10.219.3.74:24940,10.219.3.73:25,<,250-CHUNKING,
    2014-09-22T20:09:46.716Z,Exchange-SMTP send connector,08D1A4A14C7EDED6,12,10.219.3.74:24940,10.219.3.73:25,<,250-AUTH SCRAM-SHA-1 GSS-SPNEGO DIGEST-MD5 CRAM-MD5 NTLM,
    2014-09-22T20:09:46.716Z,Exchange-SMTP send connector,08D1A4A14C7EDED6,13,10.219.3.74:24940,10.219.3.73:25,<,250-AUTH=SCRAM-SHA-1 GSS-SPNEGO DIGEST-MD5 CRAM-MD5 NTLM,
    2014-09-22T20:09:46.716Z,Exchange-SMTP send connector,08D1A4A14C7EDED6,14,10.219.3.74:24940,10.219.3.73:25,<,250-STARTTLS,
    2014-09-22T20:09:46.732Z,Exchange-SMTP send connector,08D1A4A14C7EDED6,15,10.219.3.74:24940,10.219.3.73:25,<,250-DELIVERBY,
    2014-09-22T20:09:46.732Z,Exchange-SMTP send connector,08D1A4A14C7EDED6,16,10.219.3.74:24940,10.219.3.73:25,<,250-MT-PRIORITY,
    2014-09-22T20:09:46.732Z,Exchange-SMTP send connector,08D1A4A14C7EDED6,17,10.219.3.74:24940,10.219.3.73:25,<,250 ENHANCEDSTATUSCODES,
    2014-09-22T20:09:46.810Z,Exchange-SMTP send connector,08D1A4A14C7EDED6,18,10.219.3.74:24940,10.219.3.73:25,*,,sending message with RecordId 52652004081667 and InternetMessageId <[email protected]>
    2014-09-22T20:09:46.810Z,Exchange-SMTP send connector,08D1A4A14C7EDED6,19,10.219.3.74:24940,10.219.3.73:25,>,MAIL FROM:<> SIZE=7653 BODY=BINARYMIME,
    2014-09-22T20:09:46.810Z,Exchange-SMTP send connector,08D1A4A14C7EDED6,20,10.219.3.74:24940,10.219.3.73:25,>,RCPT TO:<[email protected]>,
    2014-09-22T20:09:46.825Z,Exchange-SMTP send connector,08D1A4A14C7EDED6,21,10.219.3.74:24940,10.219.3.73:25,<,530 5.5.1 A TLS-encrypted connection is required,
    2014-09-22T20:09:46.950Z,Exchange-SMTP send connector,08D1A4A14C7EDED6,22,10.219.3.74:24940,10.219.3.73:25,<,503 5.5.1 unexpected RCPT command,
    2014-09-22T20:09:46.981Z,Exchange-SMTP send connector,08D1A4A14C7EDED6,23,10.219.3.74:24940,10.219.3.73:25,>,RSET,

  • Two server sockets on the same machine, one not working.

    Dear forum users.
    I'm currently having a problem with running two server sockets on the same computer.
    It gives no exceptions or anything, just that if i connect with another machine, the last serversocket that started,
    will not accept connections..
    Scenario:
    Computer 1: Main server.
    Computer 1: Game server.
    Computer 2: Client
    Computer 2 connects first to the main server (lets say port 13371)
    Then connects to game server (port 6112).
    Computer 2 failes to connect to the Game server for some reason.
    But if i open a client at Computer 1, connects to main server, and then game server, it
    works fine.
    And if I put computer 2 as a Game server,
    then everything works fine.
    Working scenario:
    Computer 1: Main server.
    Computer 2: Game server
    Computer 2: Client
    Computer 1: Client
    Now, however many that wants to connect to game server, works.
    I have gone through the code 100 times now it feels like. And still dont see why this happends.
    Anyone know if it is "working as intended"? Or just me doing something completely wrong that i cant see myself?
    Sorry for not posting code, its too much code to post.

    Oh, sorry.
    TCPServer:
    protected ServerSocket serverSocket;
    public abstract void processConnection(Socket client);
        public void listen() {
            try {
                report("Listening to clients on port: " + portNumber);
                while (serverSocket != null && acceptConnections) {
                    processConnection(serverSocket.accept());
                    report("Client accepted on serverSocket.");
            } catch (SocketException e) {
                report("TCPServer/listenForClients : SocketException.", e);
            } catch (Exception e) {
                report("TCPServer/listenForClients : Unknown Exception.", e);
            cleanUp();
            report("Stopped listening on port: " + portNumber);
        }MainServer extends the TCPServer:
        public void processConnection(Socket client) {
            try {
                MainServer_Client tmp = new MainServer_Client(client, this);
                synchronized (clients) {
                    clients.add(tmp);
                Thread th = new Thread(tmp);
                th.start();
            } catch (Exception e) {
                report("MainServer/processConnection : Unknown Exception", e);
        }GameServer extends TCPServer
        public void processConnection(Socket client) {
            try {
                client.setTcpNoDelay(true);
                GameServer_ServerClient tmp = new GameServer_ServerClient(client, this);
                synchronized(clients) {
                    clients.add(tmp);
                Thread th = new Thread(tmp);
                th.start();
            } catch(Exception e) {
                report("GameServer_Host/processConnection : Unknown Exception",e);
                e.printStackTrace();
        }Edited by: Lgeee on Apr 30, 2010 2:57 AM

  • I bought an application 10 months ago. When I did an update on my ipad, I needed to re-download, and Apple charged again for the same Applicative.

    I bought an application 10 months ago. When I did an update on my ipad, I needed to re-download, and Apple charged again for the same Applicative.

    Did you follow the directions:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store

  • UDP DatagramPacket sent between C (client) and Java (server)

    Hi,
    I have a problem sending a struct from C to Java UDP server.
    In the C (client) program, the struct is defined as
    typedef strurct dataType_s {
    char name[52];
    char add[52];
    long x;
    long y;
    } dataType;
    dataType data;
    strcpy(data.name, "sun");
    strcpy(data.add, "com");
    data.x = 100;
    data.y = 50;
    sendto(sock, (struct dataType*)&dataType, sizeof(dataType), (struct sockaddr*)&dest, sizeof(dest))
    In the Java server side, I have the following code.
    byte[] buffer = new Byte[1024];
    DatagramPacket packet = new DatagramPacket(buffer, 1024);
    udpSock.receive(buffer);
    byte[] data = buffer.getData();
    String name = new String(data, 0, 52);
    String add = new String(data, 52, 52);
    String _xx = new String(data, 104, 4);
    String _yy = new String(data, 108, 4);
    Byte x = new Byte(xx.getBytes());
    long x = _x.longValue();
    Byte y = new Byte(yy.getBytes());
    long y = _y.longValue();
    I am having problem to read the contents of x and y above. The string name and add received by the server
    are correct. However, I receive garbage value
    for x (long) and y (long). In fact, I get expection
    that I cannot create Byte x and Byte y as shown
    above. Any idea of how to send a mixture of types
    from C/C++ to Java server?
    Thanks a lot.
    Kelvin ([email protected])

    sendto(sock, (struct dataType*)&dataType,
    sizeof(dataType), (struct sockaddr*)&dest,
    sizeof(dest))You have to check the alignment of your structs. You can't be sure that a long takes up four bytes. It can very well be 8 bytes or something else depending on your settings at compilation.
    udpSock.receive(buffer);
    byte[] data = buffer.getData();I suppose this is a typo, but of course you should use packet not buffer here.
    >
    Byte x = new Byte(xx.getBytes());
    long x = _x.longValue();
    Byte y = new Byte(yy.getBytes());
    long y = _y.longValue();
    in my opinion its easier to use a DataInputStream instead:
    DataInputStream in = new DataInputStream(new ByteArrayInputStream(data));
    int y = in.readInt();
    Notice that a long in Java is 8 bytes. A C long corresponds to a Java int.
    /Per-Arne

  • Clarification about source and destination IPs for internal clients and Edge server

    I just wanted to get some clarification on the correct traffic flow between internal Lync clients and the Edge server.
    From all the diagrams I've looked at I was under the impression that if internal clients need to hit the Edge server to talk to external clients they should always do so through the Edge Internal interface which bridges to the Edge External interface and
    out to the internet.  Specifically port 3478 from the Edge AV External interface to the internal clients.
    We aren't seeing that in our environment.  When internal clients are talking to external clients we see the Edge AV External interface communicating directly with the internal client.  In fact we found this out because after the migration to Lync
    2013 external users couldn't created a AV connection to internal users on either the Lync servers.  We saw traffic on 3478 being dropped between the Edge AV External interface and the internal client.  Once we opened that port AV traffic worked.
    We never put this rule in until we introduced Lync 2013.  Lync 2010 didn't seem to require it.
    Is that the correct flow?

    I would also really love to know the outcome of this but it looks like the thread is marked as "Answered" and it is not so. 
    I've been working with a troublesome Lync deployment in which internal users are having issues sharing their desktop with external and federated users. After opening up all the 50000-59999 range for TCP/UDP on the A/V Edge external interface things are working
    much better, but we still see sporadic failures.
    It lead us to start digging into the network traffic. We see that UDP traffic on port 3478 is being routed back from the external client to the Edge A/V's external interface, inside of the DMZ's perimeter, then directly to the internal client on the internal
    network. It doesn't look like it's making a connection since the stream is so small, so I wonder if there is a design flaw in my topology?
    There are persistent static routes on the Edge server that use the internal interface to route internally directed traffic over the internal gateway. Tracert confirms the flow, but in wireshark traces, running during successful connections, UDP port 3478
    is still sending packets directly to the internal IP from Edge's A/V address. 
    We also see successfully connected sessions communicate on a different network route that we use to handle internet traffic rather than our Lync topology's route (the one defined for A/V traffic). The connection opens on ports in the 50000 range, but goes
    over a router that we have not configured for such traffic. Is that possible?
    Why is UDP traffic on 3478 trying to go directly to internal clients from external interface ?
    It sounds like it's happening elsewhere... Is this a legitimate issue to be diagnosing? Has it been observed and/or resolved by others?

  • Create a client and logical system for BW

    Hi all,
    Can anyone show me how to create a BW client?
         create a BW client and logical system for BW client.
         create sourcesystems for the other clients in BW.
    I have follow some documents
    B84: BI Connectivity
    B03: General Settings BI Integration
    But it's not working the data can't flow to BW server.

    hi,
    check out the following thread's. it will guide you
    Connection steps for SAP BW and R/3
    Info required  while  creating source system
    R/3 Source system creation error in BW 7.0
    regards
    harikrishna N

  • NFS problem between RedHat Client and Solaris Server

    Hi all, we are experiencing a problem between a RedHat client and a Solaris 10 server. For the purposes of this post, I'll call the Redhat client server A and the Solaris 10 server B.
    Server B is exporting a filesystem that server A is trying to mount. Server A can successfully mount the exported file system, however, strange things are happening. If I change to the exported mount point on server A and create a file, the file is owned by nobody:nobody, not the user that created the file.
    A look at the file on server B shows the file has the correct UID and GID (ie the UID & GID of server A).
    The fstab file on server A looks like this:
    serverB:/data /data nfs4 rsize=32768,wsize=32768,hard,nointr,rw,bg,actimeo=0,timeo=300,suid 0 0
    Does anyone have a explanation for this?
    NB: There is a firewall between server A and server B. A firewall rule is in place to allow traffic between the two servers on port 2049
    Stewart

    Hi
    If I change to the exported mount point on server A and create a file, the file is owned by nobody:nobody, not the user that created the file.On a NFS share, for security reasons, you normally dont have root provileges.
    A file createt as root user will be mapped to nobody:nobody.
    The behaviour you see is correct.
    If you want the file to be createt as root, you have to export the filesystem with -o ro,anon=0
    NFSv3 will be blocked by your firewall.
    Franco

  • Error in the Socket Communication between Java Client and VC++ Server

    In my application, using Java Client to do socket bi-communication with VC++ Server, which is done by somebody else.
    The error is after the application properly running one or two days, the VC++ Server cannot receive the messages passed by java Client, but at Java client, everything is the same, although using CheckError() after every print(), there is no exception thrown.
    The JVM is jdk1.3.1, platform is Win2k Server.
    The outputstream is PrintWriter().
    Please help me to settle down this problem. Thanks in advance.

    I read some thread in the forum, and found somebody had the similar problem with me. Just want to know how to settle this problem.
    In the client/server program. Client is a JAVA program and Server a
    VC++ program. The connection works, and the problem appears after some time. The Client sends a lots of requests to Serverm, the server seems receive nothing. But at the same time, the server is able to send messages to Client. The Client also can get the messages and handle them. Don't understand why there this problem and why it appears when it wants.
    The client is a Win2k platorm with JDK1.3.1 and the server is also a Win2K platform with VC++ 6.0.
    In the Client, using:
    inputFromServer = new BufferedReader(new InputStreamReader(socket.getInputStream()));
    outputToServer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(socket.getOutputStream())),true);
    Hope can get your help.

  • Socket Communication between java client and c++ server

    HI,
    In my project,I want to do the following:
    1.Sending datas from client to server.
    2.Getting the response from server to client.
    I written the client in java.but the server is in c++.
    Is it possible to communicate with the server using java codings itself?
    Im able to send the data from my java client to the server.
    but unable to get back the datas from server to client.
    Can anyone tell me how to do this?
    thanks a lot

    hi
    thanks for ur reply.
    I didnt get any error msg while getting the back the datas.
    Actually i divided my application into two parts.
    My application will act as both server and client.
    server ll get the browser request and send to the client and the client will send that data to the c++ server.
    Im able to do that.and unable to get the data from server.
    Didnt get any error.
    can u tell me how to make an application to act as both client and server.
    I think im wrong in that part.
    thanks a lot

  • EAP with Windows 2000 client and IAS server

    Several messages on this site point to peole using EAP on a Windows 2000 client and authenticating against an IAS server. I am running an Aironet 350 AP and trying to setup my Windows 2000 clients to use EAP only and authenticate against a Windows 2000 AD forest via IAS. The access point and client are on the latest firmware and drivers (12.0 for AP). I have two basic questions.
    1. It is my understanding that by enabling Network-EAP as the only authenticaiton type that users will authenticate and then dynamic WEP keys will be used, greatly reducing the risks of compromised WEP keys while at the same time keeping the data encrypted.
    2. Does anyone have a quick HOW-TO or point-by-point list of how to configure the Windows 2000 client to authentication using the Network-EAP method? I am currently running into a situation where no matter what I configure on the client, the IAS server reports and error with "Reason: The authentication type is not supported on this system." I also noticed that the "Authentication-Type" and "EAP-Type" fields shown in the IAS messages in the Windows 2000 Event Viewer log have the value "<undetermined>". Has anyone else run into this?

    I'm having a similar problem. I'm trying to do PEAP and it appears that IAS is not handling the request properly. It keeps trying to log the user PEAP-##### in instead of setting up the TLS and then asking for Username, Pass, Domain. The IAS error message I'm getting is:
    User PEAP-00097CFCD901 was denied access.
    Fully-Qualified-User-Name = APPLY\PEAP-00097CFCD901
    NAS-IP-Address = 172.16.200.31
    NAS-Identifier = AP1
    Called-Station-Identifier = 004096570d87
    Calling-Station-Identifier = 00097cfcd901
    Client-Friendly-Name = WirelessAP
    Client-IP-Address = 172.16.200.31
    NAS-Port-Type = 19
    NAS-Port = 37
    Policy-Name =
    Authentication-Type = EAP
    EAP-Type =
    Reason-Code = 8
    Reason = The specified user does not exist.
    So if anybody has the needed settings for Win2k (SP3 and 802.1x patch) IAS it would be much appreciated.
    Ben
    Note: if I had PEAP-####### as a user in Win2k I get:
    User PEAP-00097CFCD901 was denied access.
    Fully-Qualified-User-Name = apply.org/Users/PEAP TEST
    NAS-IP-Address = 172.16.200.31
    NAS-Identifier = AP1
    Called-Station-Identifier = 004096570d87
    Calling-Station-Identifier = 00097cfcd901
    Client-Friendly-Name = WirelessAP
    Client-IP-Address = 172.16.200.31
    NAS-Port-Type = 19
    NAS-Port = 37
    Policy-Name = Wireless Policy
    Authentication-Type = EAP
    EAP-Type =
    Reason-Code = 16
    Reason = There was an authentication failure because of an unknown user name or a bad password.

  • TCP client and TCP server...

    i m doing a project in GUI form, where the client need to enter data in text field and the data will be pass to server to process, for example if client click button "ADD" then a particular data will pass to server and do sth (save data into a file), or if client click button "DELETE", the client is actually call server to delete a particular file stored in server, how can i do it using TCP socket ??

    Hi,
    Have you debug these two applications? Does it go into the catch exception block when you close the client or the server?
    According to my test, it will throw an exception when the client or the server is closed, just log the exception message in the catch block and then you'll get it:
    private async void Process()
    try
    while (true)
    var data = await this.Receive();
    this.NewMessage.Invoke(Encoding.ASCII.GetString(data));
    catch (Exception exception)
    Console.WriteLine(exception.Message);
    Unable to read data from the transport connection: An existing   connection was forcibly closed by the remote host.
    By the way, I don't know what the SafeInvoke method is, it may be an extension method, right? I used Invoke instead to test it.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

Maybe you are looking for

  • Can someone pls Help me: How to create a Fake target table(Dummy)  in DAC

    Hi There, Can someone pls Help me in creating a Fake target table(Dummy) in DAC? Thanks, Raghu

  • Disable Nvidia Card Using Bumblebee

    Hi, I had Nvidia Optimus disabled through BIOS but it seems their is a neat way to disable Nvidia NVS 4200 in Arch using Bumblebee which is very helpful as I am still setting up my Arch system and use windows and nvidia card. Nvidia card adds another

  • Indesign affecting Reader 8.1.2 installation?

    I posted this in the Reader forum (subject: Different appearance of same file) with zero response. Thinking there might be some Adobe familial interplay at work, I'll try here: "Can anyone explain why the same PDF file viewed in Reader 8.1.2 on XPSP3

  • Parsing data from a BLOB

    I am relatively new to oracle, however I've been working with other databases for years. I would like to load a csv file into a blob record and then parse that record to populate a separate table. Ideally I would use Applications Express to allow a u

  • I just emptied my trash and I deleted important files HELP!

    I accidentally deleted files from "all my files" emptied my trash and realized what I did was not what I meant to do. Can I get these files back?