client-server

Multiple python client objects connecting to one sumo simulation

落花浮王杯 提交于 2019-12-11 17:14:30
问题 I am new in SUMO. I have a .net, a .rou (containing 300 vehicles with vehicle depart, id, route edges attributes), a .trip and a .sumoconfig file representing a traffic scenario. I want to create these 300 vehicles as python Vehicle object generating from a Vehicle class containing other functions to communicate with each other. How can they connect dynamically to sumo and get linked to those 300 cars in the scenario? I can write a server that listens for these objects and accepts connection

Is it possible to send and receive packets through different sockets?

那年仲夏 提交于 2019-12-11 16:23:37
问题 I googled for a while and read related questions here about sending and receiving through sockets, but couldn't find an answer to my question: Can I send and receive packets through different sockets? I would like to implement something like this: HOST='127.0.0.1' PORT=10000 recvSock = socket.socket(socket.AF_INET, socket.SOCK_RAW, socket.IPPROTO_RAW) sendSock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) sendSock.sendto("",(HOST,PORT)) response,addr = recvSock.recvfrom(65535) Basically,

Python socket programming design and implementation: send file to server, server compute, receive file back

别说谁变了你拦得住时间么 提交于 2019-12-11 16:23:18
问题 Here's my current algorithm. Client site: initialize socket send file to server receive file from server close socket Server site: initialize socket and listen Now in a new thread per request: receive file from client computer resulting file (40 second operation) send resulting file close socket For implementation I'm using Python with socket and threading modules, as shown in this tutorial, then I'm repeating the send/receive code on the other sides. That's my first server/client development

.net activeX equivalent

。_饼干妹妹 提交于 2019-12-11 15:29:53
问题 Is there a pure .NET replacement for ActiveX? I'm asking if there is a way for me to write a thick client side control to be loaded and interacted with in a web page in .NET, with NO com. Edit: I don't want ActiveX in pure .NET, I want a .NET alternative to ActiveX. 回答1: I'm afraid there is no perfect managed only equivalent of ActiveX. Mostly for good reason. ActiveX is a dangerous technology security wise and duplicating it's effects in many ways would require duplicating the lack of

Is it OK to send asynchronous notifications from server to client via the same TCP connection?

喜欢而已 提交于 2019-12-11 14:49:21
问题 As far as I understand the basics of the client-server model, generally only client may initiate requests; server responds to them. Now I've run into a system where the server sends asynchronous messages back to the client via the same persistent TCP connection whenever it wants. So, a couple of questions: Is it a right thing to do at all? It seems to really overcomplicate implementation of a client. Are there any nice patterns/methodologies I could use to implement a client for such a system

Transferring file between client and server (Socket error and Attribute error)

只愿长相守 提交于 2019-12-11 14:39:35
问题 I’m trying to send and receive file through TCP socket There are a lot of problems 1. When the client connects to the server. The server does not “print Client connected ..” but it prints after using the command. 2. When I use the ‘put’ command at the server occur an error socket.error: [Errno 107] Transport endpoint is not connected but the file image is already uploaded to the server. 3. When I use the ‘get’ command at the client. I can’t continue to use another command. 4. The last problem

Client/server sockets in c

我们两清 提交于 2019-12-11 13:04:52
问题 I am currently trying to understand how to use sockets to make a client/server program in C. I have been reading various tutorials around the Internet in hopes to try and make a small echo server that can deal with multiple clients at the same time. Whenever the client sends the server a message, the server is supposed to echo is back to the client. The code that I created is a combination of both a tutorial from a lecture at school (which explained how to create the client and server) as

Thrift server: detect client disconnections (C++ library)

試著忘記壹切 提交于 2019-12-11 12:15:12
问题 When running a Thrift server, it's necessary to handle cases where the client unexpectedly disconnects. This might happen while the server is processing an RPC. This is not an uncommon occurrence if the server has a blocking call which is often used to pend an operation in order to notify clients of asynchronous events. In any case, it's a corner case that can and does happen on any server and cleanup is often necessary. Fortunately Thrift provides the class TServerEventHandler to hook into

Why server waits for a client after the client application has been put in STOPPED state?

跟風遠走 提交于 2019-12-11 11:52:52
问题 This question is an extension to this previously asked question: I implemented the solution given by jxh with following params: SO_KEEPALIVE = Enabled TCP_KEEPIDLE = 120 secs TCP_KEEPINTVL = 75 secs TCP_KEEPCNT = 1 Then why the server still waits forever for client to respond? Also I found out on internet that kill <pid> actually sends SIGTERM to the given process. So I used ps -o pid,cmd,state command after 'killing' the telnet application. I saw that the telnet process was still there but

Multithreaded Server Client in MyBatis

点点圈 提交于 2019-12-11 11:33:29
问题 I have coded a single threaded client server model which does following: Server loops for client waiting.. When client runs, it sends current data available (i.e. a string which has 10 fields seperated by comma) Server reads the data from client and decodes it (simply by checking for comma) Then using mybatis server updates database. Now I want to convert this server to multithreaded one and I am really confused looking at some examples that I found while googling (i.e. chat server etc.). So,