We already have a C# server implemented with sockets.
We want to make the application on android but we can't find a way to connect to the server, the design we want to make is using html5 and javascript, because one of us has a lot of experience using this ones, any ideas/suggestions about how can we use java sockets or something else to be able to communicate with the server?
Thanks,
Sas Gabriel
Related
I'm developing a Desktop LAN base java server and client application
where a Client must login and also to pass some data to server.
assuming i have 10 clients that inserting record simultaneously to server.
which is the best approach in this kind of situation, should I use RMI for login and record insertion? or Sockets?
if sockets please provide a key idea for me to start with.
key points to consider
-Multithreading
-able to send back data on client
If you want to connect your server via internet (and/or firewalls) it is probably a hassle to do this with plain RMI. In the past I have used Java Simon for such tasks which is very easy to implement. However if you plan to support other clients than Java clients, then you should have a look at Apache Thrift or Google Protocoll Buffers
I'm new in java, and I have a problem. I have two android phones (Client and Server). Can anybody say me how to display on Client application the Server IP address?
Kryonet is a very good Java library which provides a clean and simple API for efficient TCP and UDP client/server network communication using NIO. It works on Android as well.
It will make your network programming work a lot more easier, and you can get a better understanding of how to write client and server side code.
I would suggest that you try out your network programming skills using this library.
You need not even hard code any IP address of the server while in LAN. The clients can discover the server in just one line of code.
at my job we are developing a MVC .NET website, which use RXTX Java library for serial communication, it's really simple, just sending strings to serial port, but i really want to part away with java and i thinks that a chrome app could solve our problems.
My question is, how can i have a chrome app that shows our website, and how can our website use the serial api from the chrome app. It's that possible? What other possibilities do i have?
I know that i could use a service for communicate with the serial port too, but i like the idea of having a website that runs just like a native app, but, is a good idea?
There is the USB api, perhaps you can find a USB-to-serial adapter and write a module using chrome.usb
I hope I understand your question.
You can write a packaged app which communicates with the clients serial port.
A description can be found here: http://developer.chrome.com/apps/serial.html
Once you receive data on the client, you can push it back to the server.
Well, I've been playing around with php for the last week or so, and I am wondering how I would use it to get data from a Java application. i.e: the php script sends a request to the server and asks for a response. In my particular case I want to do just that: I would like to have a java application waiting, and the php would "ask a question" to detemine if it is on or off (the server would not respond if it is off, and would if it is on - type of thing).
My question is: How do I communicate with a php script through java. How do I make requests to an application through php?
Any ideas?
If your PC is the server, then you can write a Java based server that listens to a socket -> then do something in java program when communication is received. Here's a simple example.
For real life implementation though, I'd suggest you use the PHP/Java Bridge instead. It's much faster and optimized for this sort of operations.
PHP has the ability to make web calls, open and communicate through sockets, SOAP, RPC, etc. It all depends on how your Java program would be listening.
Additionally, PHP can be written as a socket server, so your Java program could talk to it via web calls, socket or any other sort of server technology you choose.
So I am trying to stream a webcam feed from my computer to my android phone. I am using a simple forwarding server to connect the two so that I don't have to worry about home network IP firewalls ect. I am using FMJ to capture the video feed and was thinking rtsp protocol would be best because android supports reading it. My problem is I dont know how to forward the information via the server, is it as simple as forwarding UDP packets? all programs involved are implemented in java btw.
Use Netty. It is very easy to create an RTSP server with this library. For hints see the sources here.
Or you can port my library which is written in C#
http://net7mma.codeplex.com/
CodeProject article # http://www.codeproject.com/Articles/507218/Managed-Media-Aggregation-using-Rtsp-and-Rtp