Codename One Sockets Send Message to Client [closed] - java

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 7 years ago.
Improve this question
i want to write a simple App for me (Android). For this it is necessary that the server can send data to my client (only one client at a time) but unfortunately i have no idea how to use sockets or websockets with codename one.
Can someone please post a small examplecode how to establish connection, listen on it and send some small data?
greetings
Captain

You need to use the cn1lib from Steve Hannah to access websockets. Its available here: https://github.com/shannah/cn1-websockets
Found thru looking at https://www.codenameone.com/cn1libs.html
Sockets are a bit problematic though, you might want to look at push, pubnub or just https if applicable. See the chat app demo parts 5 & 6 for the former:
https://www.codenameone.com/blog/building-a-chat-app-with-codename-one-part-5.html

have a look at this example code: https://towhidz.wordpress.com/2012/03/03/simple-chat-applicationclient-server-in-android/
Google is your friend

Related

Need An Idea Of How To Setup This TCP/UDP Framework [closed]

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 6 months ago.
Improve this question
I am asking this as I am attempting to create a game library and I am kind of new to Socket programming and I was wondering if it is best that I use netty or plain old Socket.io for this. And when attempting this I just need an idea of how I should go about mixing TCP/UDP together within my framework for this section of what I am working on.
It seems you already picked netty, at least as tag. With that framework you do not do socket programming yourself. Go through the documentation and learn to focus on event handlers: What should happen when a message is received via the network?
Consider such messages simply to be events, just like a mouse click or keyboard input.

How to create wi-fi packet sniffer? [closed]

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 6 years ago.
Improve this question
I have long been studying the topics of how to create an WI-FI sniffer for android.
I work on the network routing algorithm, and my first goal is to listen to all network traffic. The second task - is to send broadcast messages. This is possible with on android phones? Yes, I got root access. Where can I read about what I want to do? This is done through sockets?
I do not want to adhere some protocols (eg WI-FI direct) and work with the existing ip-address system. I need the lowest level of interaction of OSI.
I think that it is impossible to establish a connection without sockets. One of the devices have to be a server, and another client

Actionscript game/program connect with others [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I was wondering, searched a lot in google, even tho no result, how to make an actionscript program connect with another pc.
Here's a schema i made
in the first image we have two computers, and i'm searching for the other one, and i press connect
in the second image, now that we connected we share 3 pictures...
That's just an example tho ;D
Any idea how to make a connection between users?
The multiplayer connection between users i done via sockets. But for beginners, it is usually a good idea to use some ready made library or platform to make things easier.
For flash, multiplayer frameworks that exist are
SmartFoxServer
AmfPHP
Player.IO
Red5
and many more.
Have a look at Socket Programming. These are some useful links:
http://docs.oracle.com/javase/tutorial/networking/overview/networking.html
http://docs.oracle.com/javase/tutorial/networking/sockets/
http://www.tutorialspoint.com/java/java_networking.htm
Node.js using Socket.io would be a good fit for what you need. Then use the socket.io-flash lib on your ActionScript side to talk to your server.

How to communicate between mobile with PC? [closed]

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 8 years ago.
Improve this question
I am developing a program that is used to communicate between a mobile and a pc. I don't have any idea how to start?
To do that you would need to write two separate pieces of software:
1) A Server
2) A Client
I would suggest you install the server on the PC and the client on the phone.
The client would establish a TCP connection to the server and would be able to send messages reliably. Upon receiving the messages from the client (phone) your server (pc) will act accordingly.
You can refer to the java documentation to find two simple samples about creating TCP servers and clients and these should be very helpful. Example Link
You can use the bluetooth of the mobile, and develop a Server in java for your pc.
I have done this process.

how do I set up an SMS server? [closed]

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 5 years ago.
Improve this question
Just like google as the number GOOGL (46645), I would like to also set up a server like this that will have the ability to receive text messages.
Here is a nice tutorial showing how to receive SMS using a PC (or the full SMS tutorial here).
Remember that this is Telco territory, so make sure you have capital to grease their pockets. And know that everything you do will be made as difficult as possible, further inhibited by proprietary protocols.
While Twilio doesn't yet support shortcodes, you can be up and running accepting text messages using simple POST requests sent to your server very quickly. There are other similar services out there as well so look around and use the one you like the most.
[Full disclosure: I work for Twilio]

Categories

Resources