communication

Suggestion for getting data from a web server?

倖福魔咒の 提交于 2020-01-05 05:30:08
问题 I have a web server which contains a list of "interesting locations". These are "hard coded" on the web server, and maintained from an administrator on the server-side. Users can't add or remove anything. From within my app, I want to make a button "fetch locations", and the app should then contact the web server and ask for that "interesting locations" list. I'm using Core Data and have an InterestingLocation entity in my model. The goal is to get the data from the web server and persist it

How could I query my windows application from a website

≯℡__Kan透↙ 提交于 2020-01-03 00:59:07
问题 I'm trying to figure something out regarding how I can create communication between 2 machines using the internet as the communication line. Idea I would like to have a windows service/application that know how to talk to a web site for the first place (that's easy) but since that time, the web site should query that machine and ask information . Scenario Let's imagine that I install this application on my machine, I set up where and how I have my local database and now I want to be able to

How to: Responsive available Wcf duplex communication

余生颓废 提交于 2020-01-02 09:27:31
问题 I'm working on an application that uses WCF to communicate between server and clients Server has changing number of services, along with one master service that clients can query for information about other services, and then subscribe to those they want using information from master service. Master service sends notifications to subscribed clients, when sub-services change (added, removed, etc) Also sub-services send notifications every few seconds. This sounds like a great opportunity for

Send data from Service back to my activity

被刻印的时光 ゝ 提交于 2020-01-01 12:12:14
问题 I have an activity that creates an intent, puts some extras with putExtra() and calls the startService(intent) to start a service. This service calculates some stuff based on the extras and then I want to send the result back to the activity. In which way can I do this? I tried to create an intent on my service and broadcast it using sendBroadcast(). I have a broadcastReceiver on the activity but Im not sure if I register it correctly. Im confused! Is there any other way to do so? Something

Android client and Java server TCP communication

六月ゝ 毕业季﹏ 提交于 2020-01-01 05:07:32
问题 I'm developing an Android application (client) and want it to connect with my Java server using TCP communication. I've done the code - simple program, client send a message and server echos it back - as below: Server code: import java.net.*; public class Server { public static void main(String[] args) { int nreq = 1; try { ServerSocket sock = new ServerSocket (8080); for (;;) { Socket newsock = sock.accept(); System.out.println("Creating thread ..."); Thread t = new ThreadHandler(newsock

Python os.pipe vs multiprocessing.Pipe

送分小仙女□ 提交于 2020-01-01 04:31:05
问题 Recently I'm studying parallel programming tools in Python. And here are two major differences between os.pipe and multiprocessing.Pipe.(despite the occasion they are used) os.pipe is unidirectional , multiprocessing.Pipe is bidirectional ; When putting things into pipe/receive things from pipe, os.pipe uses encode/decode , while multiprocessing.Pipe uses pickle/unpickle I want to know if my understanding is correct, and is there other difference? Thank you. 回答1: I believe everything you've

How to send data from service to activity?

拥有回忆 提交于 2019-12-31 04:07:28
问题 I'm beginner in Android development. I try to create kind of MusicPlayer, which uses Service for playing music. When I click buttons in MainActivity, I call startService with Intent, which includes signal for action, such as play, pause, stop, etc... But I want to send data back from service to activity. For example, when current track has stopped and begin to play the next one, MainActivity got to receive track name and author name. Or when last track in the playlist is stopped, button

Go - JSON-RPC - “too many colons”

时光总嘲笑我的痴心妄想 提交于 2019-12-30 12:04:11
问题 I'm trying to call a HTTP JSON-RPC server for Bitcoin using Go (not on GAE), but I get error of dial tcp http://user:pass@127.0.0.1:8332: too many colons in address or dial ip http://user:pass@127.0.0.1:8332: lookup http://user:pass@127.0.0.1:8332: no such host I tried various network configurations, but couldn't get anything going. When I just typed the address into the browser, I got a response from the server: {"result":null,"error":{"code":-32700,"message":"Parse error"},"id":null} Which

Transfer large data between .net applications on same computer

怎甘沉沦 提交于 2019-12-30 01:00:13
问题 I have two .net applications that run on the same machine. The first application is the 'Engine'. It builds images - image's size is about 4M. The second applications is the 'Viewer'. It shows the images which the 'Engine' sends. The engine sends images every 10-15 seconds. My question is what is the bast way to pass the images from the engine to the viewer. Currently, I'm using FileSystem for this. The Engine writes the image to file system folder and the viewer getting this file using

Communication between Windows Store app and native desktop application

核能气质少年 提交于 2019-12-29 17:37:10
问题 ! For the sake of simplifying things I will refer to Windows Store applications (also known as Metro or Modern UI) as "app" and to common desktop applications as "application" ! I believe this is still one of the most unclear yet important questions concerning app-development for developers who already have established applications on the market: How to manage communication between apps and applications on a Windows 8 system? (please let's not start a debate on principles - there're so many