client-server

How to secure a client/ server socket communication

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-06 04:30:41
问题 Assume that client and server apps are running on different machine Today: // Server will receive the request and cast it as needed ProxyResponse message = (ProxyResponse) objStream.readObject(); // Update message with some content ... // Sent it back to client ObjectOutputStream oos = new ObjectOutputStream(toClient); oos.writeObject(message); I'd like to further enhance this to make sure data sent out is somehow protected. How would you recommend i approach this? I am looking for an example

C- Socket : Programming a Client/Server-Application to send a file

折月煮酒 提交于 2019-12-06 03:56:48
I want to program an application to send a file with sockets: Here my Server: void str_server(int sock) { char buf[1025]; const char* filename="test.text"; FILE *file = fopen(filename, "rb"); err_abort("Test"); while (!feof(file)) { int rval = fread(buf, 1, sizeof(buf), file); send(sock, buf, rval, 0); } } and here my client: void RecvFile(int sock, const char* filename) { int rval; char buf[0x1000]; FILE *file = fopen(filename, "wb"); while ((rval = recv(sock, buf, sizeof(buf), 0)) > 0) { fwrite(buf, 1, rval, file); } close(sock); } My problem is that my client create a file....but dont write

Measuring network traffic with Indy

主宰稳场 提交于 2019-12-06 03:55:55
问题 I'm using a TIdTCPCmdServer to handle all communication with client applications. I would like my server to log all kind of stuff including network traffic. Is there any easy or clever way to see how much bytes the TCPCmdServer actually received and sent? I can only think of code like ASender.SendReply; Inc (FTraffic, Sizeof (ASender.NormalReply.Code) + Sizeof (Char) * ASender.NormalReply.Text.Length)); which is extremely ugly in my opinion because these traffic updates would be spreaded out

How to validate self-signed certification

南楼画角 提交于 2019-12-06 03:49:11
i will provide you with my question clearly so you can answer me I have a client-server (socket) connection that i secured using SslStream and as i know using ssl makes me sure that my client will only connect to my server And to do that i must add a function to my client to validate the server certification and make sure that the server is the real one (my server) but i really don't get how could i validate my self-signed certification and want your help Regards, and my thanks in advance Imagine if the certificate were not self signed - it is signed by a trusted certificate authority. The

How can a server know the request is coming from client, not an eavesdropping hacker?

不羁岁月 提交于 2019-12-06 03:33:06
I have a simple question which I can not find a simple answer to, probably I am missing something or I don t know about how some networking concept works. And I want to know what I don t know. Simply, the question is while eavesdropping is possible, how can server know the request is coming from client, not the eavesdropping hacker. Scenario : Whatever the security policy I am having, I should send something to client. It might be a asymmetric encrypted token or sth. Client has no private key, so that whatever client is able to do, send etc, a hacker can do, send too. What might be the logic

Which Delphi technology to use?

ぃ、小莉子 提交于 2019-12-06 03:29:37
问题 I have a Client/Server application written Delphi. Essentially all the application is doing is transferring xml data streams between a server application and connected clients. I am currently using the Indy TIdTCPServer component. But the server side application keeps crashing on some of my installments. And it has been extremely difficult to debug. So I am wondering if there is some "architecture" I should be utilizing which does all the tcp/ip connection management and database connection

Authentication between client-side JavaScript application and Server Side HTTP API?

↘锁芯ラ 提交于 2019-12-06 03:19:09
I have built some server-side APIs work through HTTP, for my client-side applications only. So, is it possible to authenticate applications between client-side and server-side; and how to? There are two options: Sessions HTTP authentication The idea behind session is that the server sends a hard to guess value to the client and the client subsequently passes that value back to the server on each request. That way, the server knows from which client the request likely comes from and can keep track of whether the client has authenticated itself with the server (e.g. by having provided username

Air 2 ServerSocket Crossdomain problem

混江龙づ霸主 提交于 2019-12-06 02:10:36
I wish to make an Air 2 Server via ServerSocket class (you will find below code an example about it). Constraints : Server must be in Air Client must be displayed through web browser Clients are displayed with an Web browser so when a client want to establish a connection to Air server, Flash sends a crossdomain request through socket and server sends it back but nothing hapen then. The As3Doc specifies that when flash sends crossdomain request, server must to send it back, then Flash closes connection and open a new connection if crossdomain is ok. I've tried different settings but nothing

Updating the webpage using Flask based on MySQL database.

家住魔仙堡 提交于 2019-12-06 01:22:40
I have a webpage (built using HTML & jQuery) which displays the data from a MySQL database. I am using Flask to connect HTML with my database. However, my database gets updated every 15 minutes (using a separate Python Script). Currently, I stop the flask server, update the database and restart the Flask to update the webpage. My question is the following: Is there a way to update the MySQL database in the background without having to stop the flask server? I read about concepts of AJAX and CRON, however i am not able to understand how to use them with flask asynchronously. Note: I am a newbie

What do you use for client to server communication with GWT?

三世轮回 提交于 2019-12-05 23:38:11
问题 GWT RPC is proprietary but looks solid, supported with patterns by Google, and is mentioned by every book and tutorial I've seen. Is it really the choice for GWT client/server communcation? Do you use it and if not why and what you chose? I assume that I have generic server application code that can accommodate for RPC, EJBs, web services/SOAP, REST, etc. Bonus question: any security issues with GWT RPC I need to be aware of? 回答1: We primarily use three methods of communications: GWT-RPC -