client-server

JAVA Client-Server software, Multiple machines

▼魔方 西西 提交于 2019-12-13 20:37:05
问题 I have developed a client-server game (called "SET") in java. During the debugging process I ran into a very awkward problem: If i run both the client and the server on the same machine (client connects to localhost), the game works fantastically (also if i run the server and a lot of clients). But, if i run the client and the server on 2 separate machines, then both the client and the server hang in thir Inputstream readLine method. I will mention that i'm using writeBytes method to write

Client/Server role reversal with SimpleXMLRPCServer in Python

浪尽此生 提交于 2019-12-13 19:17:22
问题 I'm working on a project to expose a set of methods from various client machines to a server for the purpose of information gathering and automation. I'm using Python at the moment, and SimpleXMLRPCServer seems to work great on a local network, where I know the addresses of the client machines, and there's no NAT or firewall. The problem is that the client/server model is backwards for what I want to do. Rather than have an RPC server running on the client machine, exposing a service to the

How to create a server which creates a new thread for each client? [closed]

这一生的挚爱 提交于 2019-12-13 10:06:09
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . I need to create a server which creates a new thread for each client trying to connect to the server. The new thread created for each client manages the client and the server process listens for new connections

program crashes when i try find MAC address

余生颓废 提交于 2019-12-13 09:38:25
问题 i have a client server application in MFC using UDP where the server displays the IP address of connected clients in a listbox. If i run the client and server on the same computer the program displays the MAC address but if i try to run the client on a different computer the program crashes . Here are the 3 functions. I have an event handler for the listbox that displays the MAC address in a second listbox when an IP address is selected. PrintMACFromIP is the code for getting the MAC address

TCP/IP library (framework) for C# [closed]

◇◆丶佛笑我妖孽 提交于 2019-12-13 09:27:30
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 8 years ago . Is there any asynchronous library for working with TCP/IP on C#? 回答1: .NET has System.Net.Sockets - did you check this out ? 来源: https://stackoverflow.com/questions/7056768/tcp-ip-library-framework-for-c-sharp

create two socket connection in one thread

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-13 08:28:11
问题 In my application i want to share file between a server and client, for that purpose i want to create two socket connection in one thread. For example at server we have thread "T" and it has opened two socket like "1234" and socket no "3456" now on the client thread "T2" i will try to connect with these sockets. So how i should implement it. server: thread { wait at socket "1234" wait at socket "3456" } CLIENT SIDE: Thread { connect with socket no "1234" connect with socket no "3456" } 回答1:

how to return TByteDynArray in SqlServerMethod DataSnap Server

我的未来我决定 提交于 2019-12-13 08:26:05
问题 I have a DataSnap Server with a Server method like this: function TServerMethods1.Get_Excel_History(key: string): TByteDynArray; Now, on the DataSnap Client using TSQLServerMethod, I successfully connect to the server in Design Mode, and I'm sending the request to Server and successfully receiver the data but can not read the output parameter. M.SqlServerMethod1.Close; M.ClientDataSet_All.Close; M.SqlServerMethod1.ServerMethodName:='TServerMethods1.Get_XML_History'; M.SqlServerMethod1.Params

How to Run Server Client code using Socket Programming in Java Eclipse?

泪湿孤枕 提交于 2019-12-13 08:08:44
问题 Client code : import java.io.*; import java.net.*; public class SimpleClient { public static void main(String[] args) throws IOException { Socket clientSocket = null; try { clientSocket = new Socket(args[0], 4442); } catch (UnknownHostException e) { System.err.println("Don't know about host: " + args[0] + "."); System.exit(1); } catch (IOException e) { System.err.println("Couldn't get I/O for " + "the connection to: " + args[0] + ""); System.exit(1); } BufferedInputStream in;

Python Twisted Stopping The Reactor With Multiple Clients

拥有回忆 提交于 2019-12-13 06:26:14
问题 If I create multiple clients by doing this: def main(): clients = [None]*10 for i in range(0, 10): clients[i] = ClientFactory() reactor.connectTCP('192.168.0.1', 8000, clients[i]) reactor.run() How to I -gracefully- stop the reactor? If I do: self.transport.loseconnection() In the protocol, then do: reactor.stop() In the factory, then the next client is going to try to come along a stop the reactor again. However, this of course leads to the error: Can't stop a reactor that isn't running How

Does struts 2 accept “POST” method to send data from javascript to an Action server?

青春壹個敷衍的年華 提交于 2019-12-13 05:28:08
问题 [I tried to simplifie the code to better understand the questions]When I tried to send data from a web side client to an ActionClass in Struts 2 like: jQuery("#bedata").click(function(){ //Function for button "bedata" var postData = "SOME DATA TO SEND" //Sendin data: $.ajax({ type: "POST", //Method to send the data. I would need "post" method as better option. url: "GuardaFila.action", //Action called to data treatament data : { jgGridData: postData, //PARAMETER jgGrdData with variable