client-server

Receive an image on the iPhone (TCP Client)

梦想的初衷 提交于 2019-12-12 08:14:08
问题 I'm programming a client on the iPhone. I want to send some strings, and receive an image from the server. I found this tutorial (http://www.devx.com/wireless/Article/43551), it has been very useful. It works if I want to receive strings, but now I want to receive an image, and I can't make it work. This is my code when the iPhone receives data. It's a mix made with the tutorial and this answer from JeremyP (http://stackoverflow.com/questions/4613218): - (void)stream:(NSStream *)stream

What is the difference between a web application and a client/server application?

只谈情不闲聊 提交于 2019-12-12 07:57:17
问题 I took this from another question I had. Under appropriate uses for sqlite it has: Situations Where SQLite Works Well •Websites SQLite usually will work great as the database engine for low to medium traffic websites (which is to say, 99.9% of all websites). The amount of web traffic that SQLite can handle depends, of course, on how heavily the website uses its database. Generally speaking, any site that gets fewer than 100K hits/day should work fine with SQLite. The 100K hits/day figure is a

Scout Eclipse ScoutServerTestRunner on client tests

☆樱花仙子☆ 提交于 2019-12-12 06:14:48
问题 now I run on new problems with scout testing. I have Client fragment project for testing and I would like to test some templates I created. My problem is that this templates contains some SmartFields and I would like to test them. For this I probably need ScoutServerTestRunner , so the server is up and running. But If I try to add it I get error : @RunWith(ScoutServerTestRunner.class) @ServerTest() I get error : ServerTest cannot be resolved to a type , all of my assert imports are deleted

data from gps sometimes changed to unreadable format

梦想与她 提交于 2019-12-12 05:39:49
问题 I am getting data from avl system as you can see with this format : *HQ,4106016320,V1,090458,A,5257.4318,N,15840.4221,E,000.00,000,101115,FFFFFBFF,250,01,0,0,5# As you can see the data that i get from the gps is : As you can see in some lines the data is unreadable .why this problem happened? My server that gets the data is like this : using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.IO; using System.Linq; using

File Management Server in JAVA

橙三吉。 提交于 2019-12-12 04:48:23
问题 I have an application(SWT) where i need to manage a file at the server end. By managing i mean 3 things, writing contents to the file, applying read/write lock mechanism to it and displying the same in the TextArea . I need to create a multithreaded server to achieve this as my application(which actually is a eclipse based plugin) accepts multiple users . I'm new to this client-server thing and socket programming and i've read few tutorials but still havent found any optimum solution to it. I

Can't send message over hotspot, using TCP connection. Android

江枫思渺然 提交于 2019-12-12 04:34:12
问题 I'm creating an simple app, in which I want to send message over local wifi connection using TCP. So I'm creating hotspot on one device and connect it from other device. Now, on hosting device, I'm running following server application and on connecting device I'm running client application. But nothing happens when I press send button on client device. My code for both server and client is as following: Code for server: import android.os.Bundle; import java.io.BufferedReader; import java.io

Sending Message Over TCP in Swift (NULL terminated)

浪尽此生 提交于 2019-12-12 04:30:29
问题 I am using swift socket library with the following code: let client:TCPClient = TCPClient(addr: "127.0.0.1", port: 8080) var (success,errmsg)=client.connect(timeout: 1) if success{ var (success,errmsg)=client.send(str:"|~\0" ) if success{ let data=client.read(1024*10) if let d=data{ if let str=String(bytes: d, encoding: NSUTF8StringEncoding){ print(str) } } }else{ print(errmsg) } }else{ print(errmsg) } The code works great but my problem is that my server gets the data without null-terminator

Cancel file upload on server when cancelled from client

烂漫一生 提交于 2019-12-12 04:25:32
问题 I am using kendo file upload control in my application. I select a file of 20 MB size for example. The request goes to the server which needs to upload this document to azure + insert a DB entry pointing to the blob. Issue is, if the server has all the bytes transferred to itself and the rest of the operations takes sometime (like uploading the file and inserting an entry to DB) and at the same time, user cancels upload from client, it gets cancelled on the client end BUT server still goes

C++ issue while sending and receiving a file using sockets within a Linux machine [duplicate]

别说谁变了你拦得住时间么 提交于 2019-12-12 04:05:53
问题 This question already has answers here : Java multiple file transfer over socket (2 answers) Closed 3 years ago . I am trying to send the file file_to_send.txt : Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis quam eros, fringilla et accumsan vitae, tincidunt scelerisque lacus. Nulla facilisi. Duis eget fringilla erat, sed dignissim libero. Quisque nec velit auctor, varius ex id, mollis ipsum. Suspendisse faucibus erat dolor, a imperdiet dolor rutrum a. Integer sed tempus orci.

UDP connection between C server and Java client

和自甴很熟 提交于 2019-12-12 04:04:31
问题 I have another question :) I have a simple UDP server in C that reads some bytes applies some decode to those bytes and when it has a STRING of the form ###@####@###@### he sends it throug UDP to another server in C. Here is the code for my C server that is called preprocesamiento.c Im posting the whole thing cos is easyer but maybe this has nothing to do with my problem. #include <sys/types.h> #include <sys/socket.h> #include <netdb.h> #include <string.h> #include <stdio.h> #include <stdlib