client

wrong usage of BufferedReader

只愿长相守 提交于 2019-12-23 09:31:05
问题 s=new Scanner(new BufferedReader(new InputStreamReader(this.clientSocket.getInputStream()))); while(s.hasNext()){ System.out.println("Am intrat in bucla s:"); longitude=Integer.parseInt(s.next()); System.out.println("Valoare longitudine:"+longitude); latitude=Integer.parseInt(s.next()); System.out.println(latitude); I'm using the lines above to read some data from a client-server connection;this is the server side.The data are read in scanner s and after that I try to display it,but when I

no route to host

丶灬走出姿态 提交于 2019-12-23 09:03:48
问题 I wrote apss to mu Phone with Android. I debug it on phone. I try to connection with serwer wrote in C# but every times where I try to connect I have exception EHOSTUNREACH (No route to host) I add to manifest <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> <uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" /> My code to connect

IOS: How to reconnect to the server (PC) after it's got Disconnected

左心房为你撑大大i 提交于 2019-12-23 05:29:18
问题 I have two Applaction one is the client ( IOS device ) and the other one is the server ( PC device ). When I run the client it will connect to the server, and when I disconnect the server it will show Disconnected. Question: How to reconnect to the server after it's got Disconnected? Here's my code in the client (IOS device) side -(void)viewDidLoad{ [super viewDidLoad]; NSString *ipAddressText = @"192.148.211.42"; NSLog(@"Setting up connection to %@ : %i", ipAddressText, 111);

Java Socket on Different Machine Does Not Work

两盒软妹~` 提交于 2019-12-23 05:29:12
问题 I've tried many examples on web and one of them is this: http://zerioh.tripod.com/ressources/sockets.html All of the server-client socket examples work fine when they are tested with 127.0.0.1 BUT it never ever EVAR works on two different computers with actual raw real IP address ("could not connect to host" on telnet and "connection timed out" when tested on java client - the server program just waits for connection) Note: Firewall is turned off for sure IP address from ipconfig didn't work

BAD_PARAM in java CORBA

Deadly 提交于 2019-12-23 04:33:39
问题 I'm encountering the BAD_PARAM error when I program the Client-Server Chat program in Java. The first code segment is the Server //Server.java try { ORB orb = ORB.init(args, null); POA poa = POAHelper.narrow(orb .resolve_initial_references("RootPOA")); poa.the_POAManager().activate(); ServerImpl s = new ServerImpl(port); System.out.println(port); org.omg.CORBA.Object obj = poa.servant_to_reference(s); Server r = ServerHelper.narrow(obj); // get reference to root naming context org.omg.CORBA

Allow client app to automatically connect to server app on same network

陌路散爱 提交于 2019-12-23 02:56:19
问题 I've created two apps (A client and a server) which can communicate with each other as long as I input the local IP address of the machine the server app is running on into the client app (in code). I would like the client app to automatically discover the local IP address of the machine running the server app and connect to it, so they can be run on any network without the need to enter the IP in code. Both of these apps with be running on the same network (ie. Over WiFi, not the Internet)

High performance TCP Client in .net

霸气de小男生 提交于 2019-12-23 01:13:32
问题 A lot of the good posts on .Net sockets seen on SO are around writing scalable high performance servers. High performance TCP server in C# How to write a scalable Tcp/Ip based server While those posts are very good, what are the core things to focus on when writing high performance TCP Client Applications? A scenario for a high performance client would be an application that streams requests to a server and processes responses in a non-blocking fashion. Such a client should also have a

How to setup HTTP Basic Authentication for SOAP Client within WebSphere Liberty

早过忘川 提交于 2019-12-23 01:02:08
问题 We are trying to deploy an EAR on WebSphere Liberty. Our application contains an EJB-module, which contains and EJB that makes a call to another SOAP server. The WSDL of the service defines a wsp:Policy with ExactlyOne of http:BasicAuthentication xmlns:http="http://schemas.microsoft.com/ws/06/2004/policy/http"/ After deployment when we send a request to our application, which would trigger that SOAP-call we get an error: None of the policy alternatives can be satisfied. I found some java-code

Massive multiplayer in xna

Deadly 提交于 2019-12-22 18:25:05
问题 What do you think about xna and massive multiplayer? for example server and 100 clients? Is there any nice tutorial how to create client server application in xna? 回答1: There certainly are tutorials on how to do it. Personally I use Lidgren for my online prototype. I've only tested it with 4 people total and the server running on a low resource ubuntu vps, running on Mono, so I can't tell you how it will scale up but I'm sure others could. For quick reading check out the site, http://code

ZeroMQ - how to make a CLIENT to give up and try at a later time if the SERVER doesn't respond?

情到浓时终转凉″ 提交于 2019-12-22 17:36:31
问题 Lets say I have a very simple Client/Server model, using REQ/REP from ZeroMQ. See python code below. In the code below the client will wait forever, but I want the client to give up (lets say after 20 seconds) and move on with its life if it doesn't get a response. The server could be down, the router unplugged, the WiFi is not working. I really don't or should care why. Then at a later time, I'll have the client try again and it could be a completely different request. But I fear I'll cross