client-server

Login/Register by using RESTFul api written on Java

淺唱寂寞╮ 提交于 2019-12-25 01:29:02
问题 I have created Java Web Application by using Netbeans IDE. I have created entities with relationships. Webpages are simple dashboards where I can add new entities, change them and delete them. I have added Restful web services to my entities. So web page will be available only for admin and I want to create client application that will have access only for his own data. That means client must login or register to my server. When user logins/registers on website, server will create session for

How to retrieve a String when there is a continuous flow of the messages at the server from a buffer?

淺唱寂寞╮ 提交于 2019-12-24 22:41:37
问题 I implemented a basic Client and Server program using Netty. Client sends group of message strings to the server and the server accepts and displays it to the terminal. I can do this for any number of strings. But sometimes the strings are cut to half or any size and are displayed at the server. Is there any way to eliminate this? We are sending QuickFix Strings from Client. Below is my sample QuickFix string: 8=FIX.4.29=0007935=A49=TTDS68AO56=RaviEx34=152=20170427-14:05:04.572108=60141=Y98

Close Client after the server respond

一个人想着一个人 提交于 2019-12-24 21:22:28
问题 The only thing i want to change is to close the client connection after the client send message to the server and received respond from the server. what i need to change in the client code ? Server using System; using System.Net; using System.Net.Sockets; using System.Text; using System.Threading; // State object for reading client data asynchronously public class StateObject { // Client socket. public Socket workSocket = null; // Size of receive buffer. public const int BufferSize = 1024; //

server side of adsense

守給你的承諾、 提交于 2019-12-24 18:52:53
问题 Google ask you to add a javascript code to your page and it will generate the links. The script has some id which are sent to the server, but I don't know how. <script type="text/javascript"><!-- google_ad_client = "ca-pub-1234567890123456"; /* snipet_name */ google_ad_slot = "123456789"; google_ad_width = 728; google_ad_height = 90; //--></script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script> I'm curious to know how the client and slot

peer to peer communication - java

≡放荡痞女 提交于 2019-12-24 17:29:20
问题 I need to create a program where a peer needs to communicate with other peer. I have vaguely created a structure but it does not work. I know I am making a mistake but not able to figure out the problem. I create a server socket as a thread and create a client socket thread which will talk to the server socket thread. after I enter a port, the program does nothing... server.java ------------ class server { public static void main(String argv[]) throws Exception { //server socket ServerSocket

How can I deserialize an object if I don't know the right type?

可紊 提交于 2019-12-24 17:23:08
问题 Well I want to send commands and data between client and server. I have three projects: Client Server Common - here I put common classes and network abstraction layer I am using following data structures for communications between client and server public class Packet<T> { public string Name { get; set; } public string From { get; set; } public string To { get; set; } public PacketType PacketType { get; set; } public T Container { get; set; } public Packet() { } public Packet(string name,

What's the Best Way to Open a TCP Stream to Server?

杀马特。学长 韩版系。学妹 提交于 2019-12-24 15:21:46
问题 Rather a hard to nail down question, but basically I'm wondering what the best way (and not "what's your opinion" but "which will most adequately meet the requirement i shall set forth) is to open a stream connection from a client side webpage to a server such that either can send data to the other without polling? I'm thinking the term for this is HTTP binding vs. HTTP Polling. The context here is a chat application - i'd like a streamed connection so that the browser isn't constantly

Client in DART comunicate with server in PHP: access control allow origin headers missing

邮差的信 提交于 2019-12-24 13:26:28
问题 This is my client: import 'dart:html'; void main() { var request = new HttpRequest(); request.open('post','http://127.0.0.1/dartphp/index.php',async: true); request.send("some data"); } and my server: <?php header("Access-Control-Allow-Origin: http://127.0.0.1:3030"); header("Access-Control-Allow-Methods: POST, GET, OPTIONS"); ?> <html><body> <?php echo "postback"; echo "<pre><br>post<br>"; echo $HTTP_RAW_POST_DATA; echo "</pre><br>"; ?> </body></html> I execute the dart in Dartium on 3030

Erlang client-server error

≡放荡痞女 提交于 2019-12-24 13:22:21
问题 I'm reading the book Programming Erlang and on page 253 there is an example for running a client/server connection. The code below suggests to run the following commands in two separate erlang console windows from which I get the following error. 2> socket_examples:nano_client_eval("list_to_tuple([2+3*4,10+20])"). ** exception error: no match of right hand side value {error,econnrefused} in function socket_examples:nano_client_eval/1 (socket_examples.erl, line 28) the command for the server

Android Client-Server architecture: GCM versus webservice

我的未来我决定 提交于 2019-12-24 12:01:04
问题 I have an Android application with a local database that contains information about pictures stored on the device. I want to create a server with pictures that could be provided on demand to all devices that have my application installed. So my application can provide local pictures or pictures from my server and also needs some information related to those pictures. I analyzed GCM and it great for message communication, but since the size of the message is limited to 4kb I can't send the