client-server

Sending files between client - server through TCP socket in python?

倖福魔咒の 提交于 2019-12-24 12:00:37
问题 I'm trying to send and receive files through a TCP socket. When user types put abc.txt , abc.txt should be copied to the server. When user types get def.txt , def.txt should be downloaded to the user computer. (Actually I have to implement 2 more methods - ls to list all files in the client directory and lls to list all files in the server, but I haven't done it yet.) Here's the code Server import socket import sys HOST = 'localhost' PORT = 3820 socket = socket.socket(socket.AF_INET, socket

Working with forms in Drupal 7

痴心易碎 提交于 2019-12-24 11:01:10
问题 I have nodes keeping a picture. There is a task to provide an ability to select a type and a size of the picture in every node for further downloading to the end user device. To do this, I want to attach a form under every node to allow user select a type and a size they need. After user select it and put submit-button I want to process user's request, to generate the picture they need on the server side and make somehow his browser to download it. But I have no idea how to achieve this

Unix TCP servers and UDP Servers

自作多情 提交于 2019-12-24 10:46:58
问题 Why is the design of TCP servers mostly such that whenever it accepts a connection, a new process is invoked to handle it . But, why in the case of UDP servers, mostly there is only a single process that handles all client requests ? 回答1: The main difference between TCP and UDP is, as stated before, that UDP is connectionless. A program using UDP has only one socket where it receives messages. So there's no problem if you just block and wait for a message. If using TCP you get one socket for

Asynchronous client broadcast receiver

三世轮回 提交于 2019-12-24 09:58:49
问题 I would appreciate any help/feedback on this issue. I'm developing an Asynchronous socket connection in C#, i would like to set a broadcast client receiver such that it broadcast local network servers and then it receives the messages from the local servers. the main issue is that first i want to broadcast to different servers from one client and then retrieve the ip addresses from all the servers. here is part of the client code. also the server side works fine. public void

A Client Walks Into a Server And Asks “What's New?” – Problems With Sequence Numbers

谁都会走 提交于 2019-12-24 07:25:14
问题 I'm looking for a solution to an edge case scenario where a client continually asking the server for what's new will fail. In this example, I'm not using timestamps because of another edge case problem. That's handled in this question: A Client Walks Into a Server And Asks "What's New?" – Problems With Timestamps Assume we're using sequence numbers. There's a single sequence number that is atomically updated every time the table is changed. When any row is updated it records the current

accessing wcf client identity on service

若如初见. 提交于 2019-12-24 07:05:56
问题 After couples of WCF tutorials, I could develop a WCF client/Server application, both service and client applications are Windows Forms Application. I can call service using each client by specifying UserName and password. My WCF service applications also shows all the connected clients with their username as well. But, When multiple clients send a request to service then I'm not being able to identity which user has called the method. This is important as my application tend to have its own

How to design a distributed application using a Message Broker and a Database?

前提是你 提交于 2019-12-24 05:44:06
问题 I would like to implement an distributed Point-Of-Sale system, somewhat like the one described in Point of sale app architecture advice. It is a distributed system with these charachteristics: The clients are mission critical , they should work even if the network connection or the server fails, but just for a few days or so. The clients must be easy to install. Each client has it's own local embedded database. The communication between the clients and the server is using a message queue. The

RSA - How can the client (in server context) encrypt/decrypt incoming data?

坚强是说给别人听的谎言 提交于 2019-12-24 04:50:17
问题 I have trouble understanding exactly how RSA works. Many examples and definitions attempt to explain but use a vague context. So here is what I want to do: I have a server that uses RSA and has a private and public key. From what I understand, upon connection the server sends the public key to the server in an unencrypted manner.. some kind of handshake if you will. Further traffic would then occur in an encrypted fashion. To establish this fashion how would I be able to both encrypt what the

Validating client binaries in client/server handshake

可紊 提交于 2019-12-24 04:21:46
问题 I am building a client-side program that connects to a server. This client-side program needs to have the source code available to the users as part of the licencing (not an option). However, I need to ensure that when a user connects to the server with that client-side program, it's running with the original code and hasn't been altered and re-compiled. Is there any way to check during connection to the server that they're using an unaltered version of the program? 回答1: No, there's really no

Validating client binaries in client/server handshake

点点圈 提交于 2019-12-24 04:21:36
问题 I am building a client-side program that connects to a server. This client-side program needs to have the source code available to the users as part of the licencing (not an option). However, I need to ensure that when a user connects to the server with that client-side program, it's running with the original code and hasn't been altered and re-compiled. Is there any way to check during connection to the server that they're using an unaltered version of the program? 回答1: No, there's really no