connection 2 « connection « Java Network Q&A

Home
Java Network Q&A
1.API
2.bluetooth
3.Client
4.connection
5.Cookie
6.Development
7.Email
8.File
9.ftp
10.http
11.HttpClient
12.https
13.ip
14.Network
15.OS
16.RMI
17.Security
18.Server
19.Socket
20.tcp
21.UDP
22.url
Java Network Q&A » connection » connection 2 

1. Connection is failing at ObjectInputStream for Server    coderanch.com

This server fails to get passed line 181 (ObjectInputStream ois = new ObjectInputStream(client.getInputStream()) within my Connection class thread. I am not seeing why the creation of this ObjectInputStream is causing me problems. CODE STARTED:: import java.io.*; import java.net.*; import java.util.*; public class Server2 { Map services; //Used to hold Multiple Listeners Set connections; //Used to hold multiple connections int maxConnections; //# ...

2. Connection refused    coderanch.com

"Connection Refused" usually means that there is no process bound to the port you are trying to connect to. You say your code is "working fine". Does that mean that this is an ongoing process which suddenly stopped working or did you have it working on one system then try to put the client and server on different systems?

3. multiple sockets connection. One jammed affects all    coderanch.com

I've written client/server communication code using socket. multiple clients can connect to a server where the clients are receiving incoming stream published by the server. This problem only happens when the server is deployed on solaris OS (not in winXP). A client can run in any OS. -When 2 clients are connected to server (running in solaris) -one client is freezed ...

4. Sending Username/Password over Socket Connection    coderanch.com

I'm writing an AIM clone and so far everything went pretty smoothly. Instead of automatically letting the client connect to the server and letting them join the chat session, I'd like to make sure that they are registered with the server. I've already implemented a fairly flexible design for storing user information but the problem I'm having is how to get ...

5. problem in checking net connection    coderanch.com

6. Socket connection problem    coderanch.com

7. Socket Client: How to handle FIN when establishing connection?    coderanch.com

Hello. I am trying to create a client socket app to connect to a third party service. One of the validation tests that they perform is to see if I can handle a FIN right after establishing the connection. So, I create a new socket, the connection is established and then they send a FIN. I have searched online, but can't ...

8. checking for an open connection    coderanch.com

import java.lang.*; import java.io.*; import java.net.*; class Server { public static void main(String args[]) { String ip = args[0]; String port = args[1]; String msg = args[2]; System.out.println(ip + " " + port + " " + msg ); try { /*here i need to check if there is a connection already opened with the host and just send the message ...

9. Re checking the connection    coderanch.com

10. How to determine the OPTIMAL number of connections accepted by the server socket    coderanch.com

Socket soc = null; while((sock = serversocket.accept()) != null){ //create worker thread to handle job } if I simutaneously create 1000 client socket. I get connection refused exceptions on a few of them since the server can only hanlde a certain number of connections. Every time the server accept, it will create a new socket with different port number to communicate ...

11. Is FTPClient optimized to reuse open connections?    coderanch.com

I am using org.apache.commons.net.ftp.FTPClient class to connect to a remote server for FTP. My doubt is that if I connect to the FTP Server using ftp.connect(), where ftp is a object of class FTPClient, I dont explicitly call ftp.disconnect() and again try connecting to the FTP Server through ftp.connect(), will it reuse the connection if it has not timedout? The catch ...

12. Socket connection problem, need a hand..    coderanch.com

Hi: In my app, I am having problem connecting via the socket, here is a portion of my code InetSocketAddress addr = new InetSocketAddress(this.host, this.port); socket = new Socket(); socket.setSoTimeout(timeout); socket.connect(addr, timeout); // IOException is thrown right here.. in = socket.getInputStream(); out = socket.getOutputStream(); basically i tried a couple of values of timeout, i tried to make timeout bigger, but that ...

13. Managing Socket Connections    coderanch.com

Originally posted by Shashank Tilwalli: Hi, I have a scenario with I have to make a TCP/IP connection on a specific port to a certain Destination. Is there any specific design pattern for managing connections of such sort, such as connection pooling etc or do we have to manage all those stuff ourself. Thanks Shashank

14. Problem in socket connections    coderanch.com

15. how can I detect liveliness of a socket connection?    coderanch.com

I have a server and a client. Client is obtaining messages from server through a socket and is a slow consumer of messages. When the the server is stopped, I end up getting stale messages. Please suggest a way to overcome this. Can I check from client side if the server side socket is still alive? Thanks in advance.

16. how can i check if connection is alive ?    coderanch.com

I think the only reliable way to know is to try it now and then. Some servers expect a heartbeat from clients ... if they don't call in every once in a while the server assumes the client is dead and ends a session. Some clients ping the server now and then to see if it's still alive. Another approach is ...

17. sending objects over a connection.    coderanch.com

here is my client side object initialization and write. try{ AdminConnection = new Socket("ComputerName",3000); if(AdminConnection.isConnected())System.out.println("is Connected()"); try{ PrintWriter writer = new PrintWriter(AdminConnection.getOutputStream()); Administrator admin = new Administrator(AdminConnection,""); writer.print(admin); writer.flush(); }catch(IOException e){} }catch(Exception e){} And here is my serverside code to test to see if a connection is in fact, an Admin. try{System.out.println("got to objectInputStream initialization"); ObjectInputStream input = new ObjectInputStream(socket.getInputStream()); // ...

18. Post Parameter Socket Connection    coderanch.com

I can post to a page with the following code: private void callSocket() { SSLSocket socket=null; BufferedReader in=null; PrintWriter out=null; try { System.out.println("getting to 1"); SSLSocketFactory factory = (SSLSocketFactory)SSLSocketFactory.getDefault(); socket = (SSLSocket)factory.createSocket("localhost", 443); socket.setSoTimeout(20000); socket.startHandshake(); out = new PrintWriter( new BufferedWriter( new OutputStreamWriter( socket.getOutputStream()))); out.println("POST https://localhost/webapp/wcs/stores/servlet/AmIPosting.jsp HTTP/1.0"); out.println("Content-Type: application/x-www-form-urlencoded"); out.println(""); out.println("param1=jebadiahspringfield"); out.flush(); /* * Make sure there were ...

19. Checking integrity of Connection    coderanch.com

Hi I have written one socket server which is listening from 2-3 client. and Server socket is reading in while loop, it is reading lot's of information and after that I am dumping that information into database. But before reading I checked integrity of connection using con.isReadOnly();(dummy operation) .This is required because if I have no db connetion avaible . I ...

22. Socket Connection.. Was working, now it's not??    coderanch.com

I had a working socket connection just yesterday, and now it's not working, but nothing has changed?! Here is the code: package test; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; import java.net.Socket; import java.net.UnknownHostException; public class socketTest { public static void connect(String ipAddress, int port) { try { // Connect to server Socket mySocket = new Socket(ipAddress, port); PrintWriter out ...

23. connection refused    coderanch.com

"connection refused" usually means there's no process bound to that port to receive a connection. Since we've established that the IP's correct and you have a path to the device, it really boils down to the port. Check the documentation and contact the vendor. You could try running the VB program and see if that works with the same IP and ...

24. Win service with inet connection    coderanch.com

Hi, I tried Java Service Launcher (JSL) and Java Service to start a java programm as a windows service. I experience the same problem with both tools, the registration as a service is succesfull. Starting the service the java programm gets an error while trying to connect to the internet, ... Standalone this works just fine. Are there any issues with ...

26. Socket connection over serial link    coderanch.com

We want to be able to dial up a machine, do a quick username/password authentication, then establish a TCP/IP connection over the modem to transfer info via socket. Since this is windows ( in some cases linux ) box, leveraging RAS might be an issue (presumably this would require some JNI work). Can you provide any thoughts/direction on this? Steps 1. ...

27. I want to know how a program can be written on:connection from one server to another    coderanch.com

Pramod, Welcome to JavaRanch! Note that while we are happy to help you by answering questions, this is not a site where someone will do the whole project. Take a look at Runtime.exec() to run command line programs and RMI (or something similar) for remote calls. I'm going to move this to Java in General, since the question doesn't seem to ...

28. Socket connections    coderanch.com

29. external program connection to web server should trigger pop up    coderanch.com

Hi everybody, I have a problem in understanding how to generate a special kind of pop up window. The pop up questions asked here before are related to clicks, or mouse movements but not to external programs. I use tomcat as web server and the user can access servlets on it. A mysql database in the background of the web server ...

30. Mixing client side user interaction with serverside TCP/IP connections    coderanch.com

Hi all, I have a fairly strange problem, and I have no idea what sort of framework I should be using, Servlets look the most promising. Situation: I need to interface with an external TCP/IP device that is on the local network and can be connected to using hyperterminal (SSH) or by a socket connection for reading/writing ASCII. I need to ...

31. How to refuse connection at server using sniffers    coderanch.com

Hello, I have written a web server that listens to a particular port e.g. 25000. I want to implement a concept that the request which is coming from the client should be refused in case it contains invalid data. For example, if the web server listens to the port and the client sends a request to the port with some data ...

32. Socket Connection    coderanch.com

When you try to open the socket if the server is not running then it will time out - the amount of time waited for this timeout is configurable. You can use the failure of the socket open as an indication that the server is not running (or is too busy / in an error state / etc) and then wait ...

33. Connections between a Server and multiple clients    coderanch.com

I have to make a multi threaded client/server connection. I also have get the information about the EmployeeSearch class from an emps.jar file that I have placed in one of my directories. It is a Access database and I have already added an ODBC data source(Microsoft Access Driver [*.mdb]). The location of this class is in my properties file, which has ...

34. Java socket connection does not work in Vista    coderanch.com

We have customers who can run our Java Web Start application using Windows Vista, XP, MacOS, and most flavors of Linux. However, a handful of customers running Vista are having problems. They are able to get the program to come up, but the program is unable to connect to the server using a socket connection. One of the customers has an ...

35. accessing a server using socket connection    coderanch.com

/***Client Side Program***************/ package Test; import java.io.*; import java.net.*; public class Requester{ Socket requestSocket; ObjectOutputStream out; ObjectInputStream in; String message; Requester(){} void run() { try{ //1. creating a socket to connect to the server requestSocket = new Socket("localhost", 2004); System.out.println("Connected to localhost in port 2005"); //2. get Input and Output streams out = new ObjectOutputStream(requestSocket.getOutputStream()); out.flush(); in = new ObjectInputStream(requestSocket.getInputStream()); //3: ...

36. I won't open a connection to    coderanch.com

Looks like networking problem more than programming. Can you ping both 10.xxx and 67.xxx IP? A possible reason is if your own computer is in the 67.xxx domain or within a LAN, then practically you can ping and access any computers with the LAN. Now the 10.xxx IP may be the FTP server's public Internet IP (people from outside your LAN). ...

37. Socket Connection Problem    coderanch.com

38. passing commands using socket connection    coderanch.com

Hi, I need to access a asterisk server using socket connection and i have to execute the commands which are all in asterisk through socket.Is it possible to do?Now the following code helps me to login to the asterisk server. import java.net.*; import java.io.*; import org.asteriskjava.manager.ManagerConnection; import org.asteriskjava.manager.ManagerConnectionFactory; import org.asteriskjava.manager.action.CommandAction; import org.asteriskjava.manager.event.CdrEvent; import org.asteriskjava.manager.event.HangupEvent; import org.asteriskjava.manager.event.ManagerEvent; import org.asteriskjava.manager.response.CommandResponse; public class JavaClient ...

39. Determine VPN connection    coderanch.com

You insist on an answer? Okay, then. I don't know. It's very unlikely. Anyway when I use the VPN connection on my computer, I'm using it to connect to my company's network. Not to the Internet. I can't really picture using a VPN connection to the Internet. How would the Internet be authenticating it? Now, since it's very unlikely you're going ...

40. Java Socket Connection    coderanch.com

Say two computers are using same wireless network, so if I go and see there IP through site like whatismyip.com , it comes out to be same for both. However if I try to connect through the IP that comes in ipconfig which are different for both of them, ServerSocket does not get connection from client. That means they seem to ...

41. Measure connection speed    coderanch.com

Ping is unrelated to connection speed. Most speed measurements are done by dowloading a large (10MB or more) file, download that, and then calculate the speed based on how large the file is and how long it took to download. Similarly you can calculate the upload speed by uploading a file. Of course the source / destination of the file matters ...

42. SSO connection issue    coderanch.com

43. Connection from client to client    coderanch.com

Hi! I've been working on a simple java based instant messaging application like Messenger. It works so that clients connect to server application with Socket connection and server directs clients messages to receiving clients. I've read that this is the way that some "real" instant messaging application work. However, now I would like to develop a file transfer feature and for ...

44. getting a connection hangs after many socket reads    coderanch.com

hi, i wrote a little application which retrieves some websites. the application is working fine for about 1h and then it just hangs. i cant see whats wrong - the only thing i found out is that it hangs on the socket read calls: one thread (in netbeans) which i suspended hangs at this: SocketInputStream.socketRead0 SocketInputStream.read:129 ... I use apache's httpclient ...

46. How to check if connection is still good    coderanch.com

I have written an app that monitors multiple external devices (serial to ethernet converters spread over a wide geographic area). Everything is working except I can't tell if a connection drops (remote box down, power out, mice chewed through cable, somebody kicked the plug out, etc.) I am using telnet protocol from the jakarta.commons.net.telnet (?) package. Each remote device is monitored ...

47. Socket connection best practice    coderanch.com

I'm writing a client / server application which depends on socket connections to communicate. What I'd like to know is should I keep the same socket connection open and continually reuse it until the client closes the connection or should I be closing the connection after a task is complete and create a new socket connection to service the next task. ...

48. Java code to test whether connection to internet can be established    coderanch.com

I've made a small program to test whether the current TCP/IP settings is good to establish an internet connection. import java.net.HttpURLConnection; import java.net.URL; class Main { public static void main(String[] args){ String command; command="netsh interface ip set address"+ " \"VMWare Network Adapter VMNet1\""+ " static 192.150.5.222 255.255.255.0 192.150.1.5 1"; Runtime r=Runtime.getRuntime(); try{ try{ URL url=new URL("http://www.google.com"); HttpURLConnection con=(HttpURLConnection) url.openConnection(); con.connect(); System.out.println(con.getResponseCode()); ...

49. Connection refused, Socket Help    coderanch.com

I apologize in advance if this has already been asked, im sure it has. But I've been searching and cant get any answers. I'm learning how to make simple Client/Server Connections using Sockets and ServerSockets. I started out with a client and a server both running on the same machine, the IP address the client was using was the local "127.0.0.1" ...

50. How to simulate slow server connections?    coderanch.com

I am trying to write a bogus server to run on one particular box, which simply wastes time accepting connections to simulate a bogged down box: for (;;) { int sleepTime = testSet[i++ % testSet.length] * 1000; System.out.println("Sleeping for " + sleepTime); Socket s = server.accept(); Thread.sleep(sleepTime); s.close(); } I have a test client that takes the current system in millis, ...

51. Security over socket connection    coderanch.com

Hi guys. So I think I will have to do a little explanation of what I've been working on. It's my company's internal project; there will be three server computers, which will accept connection from sockets at a specified port, and performs some requests sent over the socket. This connection will be made from a single tomcat servlet, which is also ...

52. Looking to be able to send data to ONE Connection    coderanch.com

I am looking to be able to send data to ONE connection. Here is what I have (it works fine) to send to all connected clients... private void tellEveryone(String message) { Iterator it = clientOutputStreams.iterator(); while(it.hasNext()) { try { PrintWriter writer = (PrintWriter) it.next(); writer.println(message); writer.flush(); } catch(Exception ex) { ex.printStackTrace(); } } } I am looking to find how to ...

53. Public computer, connection refused.    coderanch.com

I went to the library to a site on my computer. It is a signed Applet that has been tried on 4 different computers and 3 different IP addresses/networks. Anyway, when I went to the library, I left my server running. When I tried to run the program, it just stopped after I accepted the certificate. I looked at the console ...

55. App to server connection    coderanch.com

Matthew Tilic wrote:I am looking at the other way around. I want to build a Java server and then the client will be an Android app. I was wondering if the ServerSocket to the Socket is the ideal connection (in case of dropped connection via lose of signal etc) type for an app that sends XML to a server and then ...

56. The Network Adapter could not establish the connection    dbforums.com

I'm a beginner user of Oracle 9i database Realease 2 (9.2.0.1.0.). I need to run a java code that connects to a database using JDBC. The problem is that I have this error that made me crazy. I really ran out of ideas, I wish that any one would help me. I can connect to the database successfully using sql+. I ...

57. Server Connection Code    java-forums.org

Hi I'm working on a connect 4 game which is must be applied on a network (server and client). The first thing, I wrote a server connection class. This class is for chatting between two people. First when the two people connect to the server, the server will send number 1 to the first person and number 2 to the second ...

58. how to handle data over two distinct socket connection    java-forums.org

hi everyone, What i need is creating a server and client and client should make two connections to the server. Then server send 4 numbers through two connections and client has to do some calculations and send back the answer two server. numbers can come randomly.that means one number can be come through one connection while others come through second connection. ...

59. Getting string from network connection (Reader)    java-forums.org

Hi, I am new to java programming and I am now writing a java client which binds a server (written in .net). The problem I am facing is, that .Net's sending string in a different way. There is a header comming and then characters. I wanted to know, how java reads the incoming strings? I mean ObjectInputStream.ReadLine(); Thanks a lot!

60. Server/clients connection periodically    java-forums.org

Not necessarily. What is creting the "checksum", or is it to be createrd "on the fly". Are these *nix machines? If so, look into JSch or SSH2 in order to make use of SSH. If not, and the machines have a running ftp server on each of them already, then use ftp to download the files (if whatever is creating them ...

61. How to make socket connection continue    java-forums.org

public static void main(String[] args) { Socket sock = null; ObjectOutputStream oos = null; ObjectInputStream ois = null; try { ServerSocket ss = new ServerSocket(10005); System.out.println(" ."); sock = ss.accept(); oos = new ObjectOutputStream(sock.getOutputStream()); ois = new ObjectInputStream(sock.getInputStream()); Object obj = null; keepConnect: while(true){ obj = ois.readObject(); SendData sd = (SendData) obj; double number1 = sd.getNumber1(); double number2 = sd.getNumber2(); ...

62. The network adapter could not establish the connection    forums.oracle.com

Hi I am trying to connection to a oracle database from my oracle application server using jdbc. conn DriverManager.getConnection(jdbc.Oracle.thin:uname/pwd@ipaddress:1523:TRCC); here ipadress is the ip address of the database,1523 is the port and TRCC is the SID. The problem is that it makes a connection 2 to 3 times then there is an exception saying: The network adapter could not establish the ...

63. Socket stuff... Connection works but neither client nor server will receive    forums.oracle.com

Okay, here's the deal... I have a serversocket and a clientsocket in the same program. I have the client connect to 127.0.0.1 and the server accepts a connection. Both server and client make a thread to listen to one another. Then the server sends something to the client. The client doesn't catch anything. When I use the client to send to ...

64. Issues with a Server / Client Connection & Nulls    forums.oracle.com

in your client class - method go() you have try catch like this: make changes at 2 places commented below try { Socket s = new Socket("localhost", 7000); // ObjectInputStream fromServer = new ObjectInputStream(s.getInputStream()); fromServer = new ObjectInputStream(s.getInputStream()); // ObjectOutputStream toServer = new ObjectOutputStream(s.getOutputStream()); toServer = new ObjectOutputStream(s.getOutputStream()); threadNum = (Integer) fromServer.readObject(); int i = 0; System.out.println("Thread number: " + threadNum); ...

65. Client-Server connection problem.    forums.oracle.com

Hi friends, Im transferring file from client to server with the help of sockets.First time, server is connected with client.Then im transferring the file from client to server, after transferring the client socket is getting closed. But I need to send files one by one from client side to server side.In a single connection from server to client, i want to ...

66. Just want a simple socket connection    forums.oracle.com

You might not want to bother with all that tiresome error handling, but unfortunately Java doesn't agree with you. You have to handle it, one way or the other. The quickest, dirtiest thing you can do here is declare that main() throws Exception. But that's not ideal, by a long shot That got rid of the error. The program itself doesn't ...

67. socket connection    forums.oracle.com

Hi i want to create a socket connection.When i run the server and then client on simulator of blackberry jde the server side gives these errors below: Exception in thread "main" java.lang.ExceptionInInitializerError at com.rim.samples.server.socketdemo.SimpleSocketServer.run(SimpleSocket Server.java:176) at com.rim.samples.server.socketdemo.SimpleSocketServer.main(SimpleSocke tServer.java:150) Caused by: java.util.MissingResourceException: Can't find bundle for base name c om/rim/samples/server/socketdemo/resources.properties, locale tr_TR at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle .java:1508) at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1262) at java.util.ResourceBundle.getBundle(ResourceBundle.java:717) at com.rim.samples.server.socketdemo.Worker.(SimpleSocketServer. java:24) ...

68. client server connection only allows 1 client    forums.oracle.com

69. calling functions over client server connection    forums.oracle.com

ie: client sends object to server where getAction() = count server receives object and evaluates the getAction() in a large if statement like so if object.getAction()=="hi" hi(); else if object.getAction()=="hello" that(); else if object.getAction()=="count" count(); else if object.getAction()=="multiply" multiply(); is there a simpler and quicker way to do this? i have thought of ways that would just allow a direct calling ...

70. Client-Proxy-Server: Connection refused    forums.oracle.com

71. Simple socket connections    forums.oracle.com

I see the client reading from System.in and writing this data to the socket stream going to the server. I see the server reading from the socket stream from client and writing back to the socket stream going to client. Neither client or server writes this data to System.out so you will not see any data on the screen.

72. client server connection    forums.oracle.com

74. socket connection question    forums.oracle.com

I have a PC on which I am streaming the bytes from an mpg. I am not using any sort of video server, just the StreamWriter application to push the bytes to a port on the Windows box.. On the UNIX side I want to connect to that port on the PC and pull the bytes off. I have tried using ...

75. erreur de Connection dropped by server?    forums.oracle.com

Hi, I've got a big problem with my java program which is used to recieve mails and operate the mails box. But when i try to connect to the server , Eclipse come out this problem after 3 minite thinking ( i've verified my adress, login and secret code...) the server use the Microsoft exchange as service. Anyone can give me ...

76. Socket Connection Question    forums.oracle.com

77. java client reading a big chunk from a C server via TCP/IP connection    forums.oracle.com

The java client reads all bytes ,that is, it reads 20 bytes..When I tried printing the array, I end up getting the array as follows: 11 0 0 0 12 0 0 0 13 0 0 0 14 0 0 0 15 0 0 0.. even if I use byte to integer conversion mechanism for this, I need to take 4 ...

78. Problems with socket connection    forums.oracle.com

Here is what I get when I run the program: Chat is sending a message. Chat with 204.84.8.184 is sending a message. HAS NEXT HAS NEXT Receiving Stream Closed...Chat It also may help to know that this code seems to work for some reason when I use 'localhost' instead of typing in my IP address. Any help is much appreciated!

79. pb whith sftp connection    forums.oracle.com

Not enough information to resolve the problem. All that can be said is that jscape attempted a connection and then timed out. Make sure yor're invoking jscape correctly. Make sure that the target host will accept an SFTP connection on the port that's being used. Make sure that jscape will do what you want. Look at the information and problems at ...

80. Getting NetWork socket connection    forums.oracle.com

82. Client connection to a Server behind a router    forums.oracle.com

true_lover wrote: All configuration seem fine. port forwarding is straight forward on the router page. I checked all numbers & values and all seemed fine. Well obviously it's not. Otherwise you wouldn't be getting a connection refused. The only other item worth checking is if your ISP is blocking the port. Which may well be happening. The other poster was correct, ...

84. Client Program wont extablish connection with Server Program    forums.oracle.com

/** This is a log class. Its primary function is to print the send\recieve logs required in this project. It has the ability be log output for either sender or reciever....and mainly...print to console because my IDE would not properly generate compile path for exportation\importation of files....but compiling outside the IDE would give no problem...and I am using the IDE specifically ...

85. Client Server Connection problems    forums.oracle.com

(a) what does 'the client no longer allows me to send a second' actually mean? (b) what datatypes are these server/client input/output streams? (c) what datatype is n[]? (d) What's the purpose of the c-- in the server loop you posted? That loop will loop forever reading EOFs if it ever reads one from a client.

86. Multi socket connections    forums.oracle.com

class Listen implements Runnable { Socket ACCEPT; String pool; Thread th; public Listen(Socket ACCEPT){ this.ACCEPT=ACCEPT; th = new Thread(this); th.start(); } public void run() { InputStreamReader reader = null; try { reader = new InputStreamReader(ACCEPT.getInputStream()); OutputStreamWriter writer = new OutputStreamWrite(ACCEPT.getOutputStream()); BufferedReader bufread= new BufferedReader(reader); BufferedWriter bufwrite= new BufferedWriter(writer); while (true) { pool=bufread.readLine().trim(); Server.jTextArea1.insert(pool + "\n", 0); //this "write" function should send ...

87. Socket Connection Problem    forums.oracle.com

I have an application of a Java Server Socket with Flex Client When the client connection to the server, Server accept the connection, then right after connection accept, the Flex apllication will then send a data by writeUTF. The server side, should read by DataInputStream ReadUTF method, but for some reason the server does not ale to read this line and ...

88. Socket Connection question    forums.oracle.com

89. Multi connections to a socket server    forums.oracle.com

You need to call ServerSocket.accept() in a loop. Each time it returns, you need to start a new thread to deal with the newly connected client communications (reads, writes) and call accept() again ASAP. If this makes sense to you great, if not, post some code, especially around where you call accept(). Edited by: baftos on Oct 10, 2007 10:14 PM ...

90. Handle multiple network connections    forums.oracle.com

What error are you getting? The only thing that can prevent you using those streams is closing one or both of them, and/or the socket. If all those variables are local and tweenAuth() takes no parameters it's impossible for tweenAuth() to have any effect on them. Is 'some code' maybe closing one of the streams, or the Socket?

91. sun application server 9 connection problem    forums.oracle.com

Hi, could you pls help me in solving the following problem, i am trying to connect access database with java,i define sys DSNand my programme compiles but when run so it gives the following errors no default driver specified. the question in my mind is whether i need to have driver for both database and java. if yes then how and ...

92. Regarding Remote Server Connection    forums.oracle.com

93. connection eror with server    forums.oracle.com

hi; We setup a new open source program, tried to connect server via Mysql and firstly i setuo the jdbc, it declined us then i setup odbc and it gives me this eror: Remote exception: [MySQL][ODBC 3.51 Driver]Can't connect to MySQL server on '192.168.1.100' (10061) Details: Unable to connect to database using DSN SERVER=192.168.1.100;DRIVER=MySQL ODBC 3.51 Driver;DATABASE=bacula;UID=admin;PWD=;! what can i do ...

94. Timing out during socket connection    forums.oracle.com

95. The Network Adapter could not establish the connection    forums.oracle.com

This isn't a java problem. The exception tells you exactly what the problem. Presuming that you can connect from the box that you tested via toad (and as the same user) then something is wrong with your data string. I believe someone noted that newer versions of Oracle have changed the port so you might check that. You can check ports ...

96. Making a socket connection through a NAT    forums.oracle.com

I was trying to figure out a way to make a socket connection through a NAT. I searched these forums as well as google and all I could find was information on NAT punch through. While this method seems to work I was trying to figure out a way to do this without the need for an external server. This is ...

97. Problem with socket connection    forums.oracle.com

And I'd like to say: stop those brittle design of class hierarchy! Well first, I've been looking through this code for a while now. All i know is socket is returning null which is why I'm getting the NullPointerException. Now, for what reason socket is null I do not know. My only guess would be because it isn't creating a connection, ...

98. MultiThreaded Server and Client connections query.    forums.oracle.com

Taking standard input for multiple threads from one console is quite unpredictable. I think the first client thread is waiting for input when you connect the second. You type something into your server window and since the first thread was waiting for input, it takes the input and sends it to client 1.

99. get hostname of client from socket connection    forums.oracle.com

100. blocking client connection, if server down    forums.oracle.com

There's much more to this than the OP realizes: 1) if the server is down before the client could establish a connection, the client has to keep retrying to make a connection. 2) if the server goes down while the client was waiting/reading for some data, the connection is lost, the partial data must be kept or thrown away depending on ...

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.