client-server

How to verify from server that client code hasn't been modified

久未见 提交于 2019-12-06 10:43:05
I have a java server that communicates with a java client via json-rpc. The client is supposed to report internal stats to the server which modifies the servers behaviour. Both client and server compenents are written in house so I can control what the client does and how it reports stats but is there a way I can verify that the client code hasn't been modified? If it has it will still service the client but using some default behaviours. The clients will be publicly available so it's not a big deal for someone to decompile them and alter behaviours. Simply having the client send a signature

Dumping data over ethernet with an arduino client / python server

本秂侑毒 提交于 2019-12-06 10:06:30
问题 I'm using an arduino ethernet to read data form sensors, and then would like to send data to a computer in another building to drive the logic/control in a piece of python software. I decided to sketch up a simple sketch in python/arduino that just sends text from the arduino to my python program over ethernet: The arduino client code is mostly taken from the EthernetClient example: #include <SPI.h> #include <Ethernet.h> byte mac[] = {0x90, 0xA2, 0xDA, 0x0E, 0x40, 0x9F}; byte ip[] = {192, 168

Android Socket (Client - Server)

帅比萌擦擦* 提交于 2019-12-06 09:47:42
问题 Hello dear programmers I need to your help. I made a very very very simple java socket (client - server) project, what worked well. But when I used that client code to make it for android, it is not working, but I am making only client code for android, the server code is in Java again(may be I should make the server code in android too?) Server(in Java) public class DailyAdviceServer{ public void go() { try { ServerSocket serverSock = new ServerSocket(16242, 50); while (true) { Socket sock =

Issue loading files w/SPIFFS (ERR_CONTENT_LENGTH_MISMATCH)

不羁岁月 提交于 2019-12-06 09:28:05
Alright so I've been looking into this for the past two days and I still feel like I'm getting nowhere. I recently started using the SPIFFS File System for Arduino development on an HUZZAH ESP8266 like the FSBrowser.ino example, and while it's been great in terms of separating code, as my code continues to grow it has not been great in terms of stability. Ever since I began adding more and more javascript, I began to have errors pop up for various files, whether it's my HTML/CSS/JS, and the primary error I see is ERR_CONTENT_LENGTH_MISMATCH . //File Read for File System bool handleFileRead

AES between server (Java - Cipher) and client (Javascript - CryptoJS)

江枫思渺然 提交于 2019-12-06 08:59:41
问题 I have to make an app in JS which encodes a message with AES and passes it to a server via AJAX. Then the server and decodes the message using Java. My question is: How to encrypt a message in JS and be able to decrypt it in Java using AES? Knowing that the communication between java and js is already established via webservices Client-side, I use the Crypto JS library (http://code.google.com/p/crypto-js/). Server-side I use the Cipher class provided with Java (I use the Java Play framework

How to get client IP address in a JBoss remote EJB call?

谁说我不能喝 提交于 2019-12-06 08:04:51
问题 How to get the client IP address at the server-side when a EJB StatelessBean method is invoked through RMI/IIOP after a classical JNDI lookup ? With JBoss 6.1 I tried the method java.rmi.server.RemoteServer#getClientHost but it throws java.rmi.server.ServerNotActiveException: not in a remote call . Is there any way to get the information ? 回答1: Is it still embedded in the thread in JBoss 6.1? String currentThreadName = Thread.currentThread().getName(); and then parse from there? 来源: https:/

Server not able to properly read/open a filename sent by client in C

只谈情不闲聊 提交于 2019-12-06 07:55:31
I'm doing client/server interaction with sockets in C. What I'm trying to do is have the client request a file to be read on the server, the server return a buffer of the file contents, and the client print out the file. Though I was able to accomplish the server sending a buffer of a file to the client & the client printing it out successfully, I can't seem to get the server to successfully read a filename sent by the client. Here is what I mean: ///This is the structure of the message that gets sent back and forth struct message { int code; //Just indicates 1 or 2 for readfile or writefile

Android: How to send song file to server throught HttpPost along with other variables

只谈情不闲聊 提交于 2019-12-06 07:53:48
问题 I am to send a song file to server through HttpPost. Currently I am using this code to send data to server HttpPost postRequest = new HttpPost(); try { List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(2); nameValuePairs.add(new BasicNameValuePair("email", Splash.pref.getString("userEmail", ""))); nameValuePairs.add(new BasicNameValuePair("password", Splash.pref.getString("userPassword", ""))); nameValuePairs.add(new BasicNameValuePair("name", etName.getText().toString()));

Java server-client readLine() method

你说的曾经没有我的故事 提交于 2019-12-06 06:46:03
I have a client class and a server class. If client sends message to server, server will send response back to the client, then client will print all the messages it received. For example, If Client sends "A" to Server, then Server will send response to client "1111". So I use readLine() in client class to read the message from server, then client print "1111" in the console. If Client sends "B" to Server, then Server will send response to client "2222\n 3333". So the expected printing output from client is: "2222" "3333" So the response message from server to client may have 1 line or 2 lines

Thrift client-server multiple roles

对着背影说爱祢 提交于 2019-12-06 06:33:50
问题 this is my first question, so sorry if the form is wrong! I'm trying to make thrift server (python) and client (c++). However I need to exchange messages in both direction. Client should register (call server's function and wait), and server should listen on same port for N (N-> 100k) incoming connections (clients). After some conditions are satisfied, server needs to call functions on each client and collect results and interpret them. I'm little confused, and first questions is "can this be