client

Having trouble with a simple Twisted chat server

好久不见. 提交于 2019-12-11 03:16:16
问题 When I try and run this (see code below) I get the "connection made" response from the server and the command prompt to write an input. However when I try and enter the input it just hangs and the server doesn't seem to receive the message. Anyone know why this is? Thanks, please say if this isn't clear enough Here is my chat server: from twisted.protocols import basic class MyChat(basic.LineReceiver): def connectionMade(self): print "Got new client!" self.factory.clients.append(self) def

SignalR .NET Client Invoke throws an exception

狂风中的少年 提交于 2019-12-11 03:10:43
问题 I'm trying to get a console application working with the SignalR .Net Client but I'm getting an error when I try to invoke a method on the Hub. Here's my code for the console app: static void Main(string[] args) { var connection = new HubConnection("http://localhost/SignalRTest"); var myHub = connection.CreateProxy("SignalRTest.Classes.service"); myHub.On<string>("addMessage", text => { Console.WriteLine(text); }); connection.Start().ContinueWith(task => { if (task.IsFaulted) { Console

Redisson NoSuchFieldError: WRITE_BIGDECIMAL_AS_PLAIN

馋奶兔 提交于 2019-12-11 02:56:25
问题 I just imported redisson 1.0.3 via maven, set up a redis-server on localhost on default port and wanted to try the redisson redis client. My test code looks as following: Redisson redis = Redisson.create(); Map m = redis.getMap("someMap"); But I'm getting: java.lang.NoSuchFieldError: WRITE_BIGDECIMAL_AS_PLAIN at org.redisson.codec.JsonJacksonCodec.createObjectMapper(JsonJacksonCodec.java:90) at org.redisson.codec.JsonJacksonCodec.<init>(JsonJacksonCodec.java:43) at org.redisson.Config.<init>

Python TCP socket.recv() returns with nothing as soon as connection is made

我与影子孤独终老i 提交于 2019-12-11 02:55:16
问题 I'm trying to implement the most basic python TCP server. Windows 8, Python 2.7, firewall is turned off. Code is from here: https://wiki.python.org/moin/TcpCommunication If I do the client stuff ( socket(...), connect(...), send(...) ) via python repl, things work fine, ie the server correctly blocks when calling recv . However if I run the exact same code via python script (both with and without explicitly calling python.exe at windows command line), the recv returns immediately with no data

How get client (user) machine name (computer name) with jQuery or JavaScript or server-side codes. (scrutiny of possible ways)

社会主义新天地 提交于 2019-12-11 02:09:31
问题 I was working on Retrieving IP address and client machine name for few days on the internet (not on the local network) so I found some ways for getting IP-address , but I couldn't find a way for getting client machine name or gathering some info about my web site users ? I know there are many duplicate threads about this issue out there , but many of them are old or do n't work. the below server side codes return SERVER NAME Not client computer name ! string UserHost_ComputerName4 = Dns

Delphi XE5 Rest Datasnap Server. Getting Client IP Address

元气小坏坏 提交于 2019-12-11 01:47:31
问题 I'm trying to get a client's IP address and other client information using DSServer 's onconnect event with the following code. My problem is that DSConnectEventObject.ChannelInfo is nil every time. Additionally, I can't resolve the IP addresses. Please help me. Thank you. procedure TWebModule1.DSServer1Connect(DSConnectEventObject: TDSConnectEventObject); var ci: TDBXClientInfo; begin ci := DSConnectEventObject.ChannelInfo.ClientInfo; AddLog(Format('Client %s Connected IP: %s, Port: %s', [ci

Configuring .my.cnf in home directory for multiple databases does not work. Works for single database

一笑奈何 提交于 2019-12-11 01:07:30
问题 Here is my .my.cnf file: [client] user=user1 password=somePasswd1 database=someDb [client2] user=user1 password=somePassed2 database=someotherDb It works if I just have one entry, as in: [client] user=user1 password=somePasswd1 database=someDb What is the significance of [client]? What should it have? Also, what if I want to restrict these user-passwords for localhost only? 回答1: https://dev.mysql.com/doc/refman/8.0/en/option-files.html says: The [client] option group is read by all client

Object has null values when subclass attempts to use it. Why?

自古美人都是妖i 提交于 2019-12-10 22:46:27
问题 I'm a newbie Java guy so I'm probably doing this entire thing completely wrong. I have to do this giant project for software engineering class. The code is about 2,000 lines long so this is skeleton code public class BookRental extends JFrame{ public Client currentClient = new Client(); // creating client object //rest of declared variables. public class Client{ //Client class containing all get/set methods for each variable private username; private void setUsername(String u){ username = u;

How do I tell a WCF client proxy class to use windows authentication and the WindowsPrincipal of the already logged in domain user as credentials?

一个人想着一个人 提交于 2019-12-10 21:15:23
问题 I've got a WPF windows client that calls a WCF web service. The user is already logged in on the windows domain before starting the application and the WCF service uses windows authentication. I want the WPF client to use the WindowsPrincipal of the already logged in user when calling the WCF service. I do NOT want to create a new NetworkCredential instance with an EXPLICIT username & password to do this, simply because asking the user to log in twice (in Windows and the app) is ... well

signalR and large data transfer [closed]

岁酱吖の 提交于 2019-12-10 20:46:57
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed last year . I am planning to use signalR between Client and server for some real time communication. How ever every now and then the client need to send large data ~15MB to the server. 1) Looks like signalR is not meant for sending large data. Have they added any support for sending large data