client-server

How to simulate a client server application I wrote in c++ using windows sockets?

时光怂恿深爱的人放手 提交于 2019-12-12 01:01:45
问题 I was asked recently to write a client server application so I did this using c++ and windows sockets and I tried it on two pcs on a LAN and it worked pretty well.My professor wants to see this working for real but I thought there could be a way to simulate that application and show that it works without having to connect two Pcs and so on....how can I do that? 回答1: You dont have to simulate anything, just run it on one machine and use 127.0.0.1 (thats an address of localhost loopback) as an

Very large HTTP request vs many small requests [duplicate]

血红的双手。 提交于 2019-12-11 23:26:50
问题 This question already has answers here : Closed 9 years ago . Possible Duplicate: Very large HTTP request vs many small requests I need a 2D array(as Json) to be sent from server to client. It would be around 400X400 in size with each entry around 4 characters of text. So that makes it around 640KB of data. Which of the following extreme approaches is better ? I make a large HTTP request of all the data at one go. I make 400 requests - each asking for a single row (around 1.6 KB) I believe

Function glob() not working with externe URL

半世苍凉 提交于 2019-12-11 23:25:55
问题 i'm confused with this problem when im working locally it's all fine with this : foreach (glob("public/FolderA/B/") as $filename) { but when i put foreach (glob("http://www.exemple.com/public/FolderA/B/") as $filename) { doesn't work any solution ??? History : in the past i'm working with glob() and communicate with local server and the scripte do this jobs perfect now donne is transfer t to other server and problem i get is how to put glob() working with external URL not locally or some

How do you make a WCF Client asynchronous?

我怕爱的太早我们不能终老 提交于 2019-12-11 23:19:33
问题 I have a client that sends a request to a server, and the server answer to him. I want to do this in an asynchronous way. The client sends a request, the server calculates it and returns it to a service in the client. How can i do this? p.s. let's say the client wants to do add(int a, int b) and the server needs to send the result to a service that run on the client. 回答1: A dual binding is only really needed when the server must send information to the client without a request. Since you are

How does a client find the port number of a server?

廉价感情. 提交于 2019-12-11 21:22:02
问题 I am currently learning about basic networking in java. I have been playing around with the server and client relationship between two of my computers. However, I cannot figure out how distributed programs (say, a videogame), can not only find the 'host' computer, but also the port number on which the server is running in order to create a Socket between the two computers. The only way I really see to create a Socket is with an already known IP Address, and with a known port number. How do

Looking for a way for a website to monitor a file on client side

好久不见. 提交于 2019-12-11 20:58:32
问题 I am developing a website which basically crunches numbers from data files and display statistics. These data files are on the client hard drive and the client can upload them to the server via the HTML upload functionality. This however requires the user to manually upload the files to update the statistics on the website. I would like to know if there is a possibility for the website to automatically upload these files when they change. I can see the gapping security hole with skipping the

Time-based syncing for iOS app

点点圈 提交于 2019-12-11 19:39:51
问题 I'm trying to implement a simple sync solution to propagate a few settings between various instances of my app and my server. Changes to these settings will be infrequent and only occur on the client(s). I would like something reasonably robust without going overboard. My strategy is to track un-synced changes on the device, and when syncing, post these to the server. The server should be able to reject a change that occurred after the previous known sync for that setting. To accomplish this,

Content download from within a Windows client - Best Practices

自古美人都是妖i 提交于 2019-12-11 18:46:44
问题 Our application is a Windows client (C++/MFC migrating to C#) that uses SQL Server Express as its data store. We release regular updates to the data the application works with. (Our users use the content data we provide as a basis for their own projects built using the client; the database stores their projects as well, to enable collaboration across a network). For a while we've used the archaic method of providing huge "update packages" containing all of the latest data. The updater would

Send server multiple messages? C#

亡梦爱人 提交于 2019-12-11 18:17:36
问题 I have a quick and dirty question. So as it stands, i have two clients and a server running. I can communicate messages from the clients to the server without any problem. my problem appears when i want to read two messages from the client - rather than just one message. The error which i receive is: IOException was unhandled. Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. Here is my code on the server side: private static

Android - Encoding image and sending it to the server

扶醉桌前 提交于 2019-12-11 18:04:48
问题 I am working on encoding the selected image from the gallery and want to send it to the server. I succeeded to send name and description of the product which is text form. but, I don't know how to encode image and send it to string form. On the server side, I need to decode it with php. My code is... public class AddEditWishlists extends Activity { // Client-Server - Start ////////////////////// JSONParser jsonParser = new JSONParser(); // url to create new product private static String url