client

How to verify rsyslog TCP communication with the server from the client side?

自作多情 提交于 2019-12-24 15:29:38
问题 I want to be able to know if all of the servers that I am logging to are properly receiving my TCP messages and answering back. I don't want to have to implement anything else on the server side, just want to monitor everything in the client machine. I want to be able to do something like a ping test but valid for a rsyslog environment, using its protocols and ports. I also know that there is a "debug" file but I believe its too much complicated to actually debug. 回答1: impstats can give you

Google Custom Login Page: Client Login Deprecated

白昼怎懂夜的黑 提交于 2019-12-24 14:21:02
问题 I have been successfully able to run a Custom Login Page for Google Apps until today. I used to use Client for the Google Apps Provisioning service. using which we could send email (username) and password as parameters and obtain the authentication token. With OAuth2 (as per Google we need to upgrade to OAuth2 starting 20th April, 2015) I can't find a solution! There's no way I can send/ check if a username/ password pair is correct. 回答1: There is no way now to do what you want. You could use

why does my web api client call not work in Raspberry Pi2 Iot

China☆狼群 提交于 2019-12-24 13:52:38
问题 I have this code: private const string route = "/api/Print"; public bool Update(string header, string tc) { bool success = false; using (var client = new HttpClient()) { client.BaseAddress = new Uri("my uri"); client.DefaultRequestHeaders.Accept.Clear(); client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); var print = new Print { CompanyRef = new Guid(), Header = header, TC = tc }; var response = client.PutAsJsonAsync(route, print); } success =

Using ThreadPoolExecutor and DiscardPolicy

心已入冬 提交于 2019-12-24 13:42:53
问题 I need to make a client queue with ThreadPoolExecutor and an ability to drop clients if it exceeds some number (5 for example). It is kinda DDOS protection. When client #6 is requesting my server - it got dropped, etc. I got my server and client code, but I don't know how to realize ThreadPoolExecutor and DiscardPolicy. Ideas or examples? Simple server: import java.io.IOException; import java.io.InputStream; import java.io.ObjectInputStream; import java.io.OutputStream; import java.net

programmatically check computer management - shared folders - open files for a file

跟風遠走 提交于 2019-12-24 13:26:20
问题 We have a client server software that needs to be updated. I need to check if the file is currently being accessed. Is this possible if so how Delphi code if possible. The only place I can see if the file is open is under the shared folders open files. I have tried this code but just shows that the file is not opened. function TfrmMain.FileInUse(FileName: string): Boolean; var H_File : HFILE; begin Result := False; if not FileExists(FileName) then begin showmessage ('Doesnt Exist'); exit; end

How to use PHP sessions with REST client application ?

僤鯓⒐⒋嵵緔 提交于 2019-12-24 12:06:37
问题 PHP use browser cookie PHPSESSID to store the session value let say 12345 and it does by creating a file for each session on server by default (session_12345.txt ) . What if the request is coming from not a browser e.g mobile cell application accessing through REST protocol . If my rest client is sending a unique value to identify it self let say 12345 then is there anyway I can tell PHP to use this value to create session_12345.txt as if this value was coming from cookie PHPSESSID ? Thanks

How to run the Haxe server and client example?

匆匆过客 提交于 2019-12-24 12:05:58
问题 I am new to Haxe. I want to try to run the example from here: http://old.haxe.org/doc/flash/chat but I do not know how to run. I just type haxe app.hxml and I have no idea how to continue. Could someone tell me how to run it? 回答1: Running haxe app.hxml creates two files: server.n and client.swf . Double click server.bat (which just starts the server via neko server.n ). Now any number of clients can connect to the server. For testing, just run the client.hx twice with the standalone Flash

Socket.io Client Request Origin URL

心不动则不痛 提交于 2019-12-24 11:29:29
问题 On the client, in the browser, I have this code: this.socket.on('initial', function(data) { console.log(data); }); On the server I have: socket.sockets.on('connection', function(client){ console.log('client connected'); }); My question is: how can I detect the URL where the request came from? For example if the first closure was running on "/posts/view/1", I want to be able to detect it inside of the second closure. 回答1: You could send this data back to the server. A little hand-wavey on the

Client Side GWT Debugging in Super Dev Mode

旧时模样 提交于 2019-12-24 10:59:35
问题 I was debugging a GWT in Eclipse using "Super Dev Mode", Java 8, and Eclipse Photon. I've put breakpoints in the client side of the code, but none of them seem to trigger. I'm reading the documentation, but it appears to relate to "Legacy Dev Mode" debugging. http://www.gwtproject.org/doc/latest/DevGuideCompilingAndDebugging.html Does anyone have any recommendations to "step through" client side code with "Super Dev Mode"? 回答1: If you use GWT's Super Dev Mode, debugging is done completely in

Communicating between two different computers with TCP/IP

流过昼夜 提交于 2019-12-24 10:40:19
问题 I've been studying how to use sockets to make two java programs communicate. Now, on each example I've gone through, they've always placed the "server side program" on the same computer on which the "client side program" was, and of course the IP set was either 127.0.0.1 , or simply "localhost". Now, my question is: how do I get to communicate the two programs if one is on a computer, and one on another? I've tried to set the IP as the one my computer has when connected to internet (the one I