SMS Receiving Port in J2ME Mobile Application - java-me

Can you please explain following doubts?
When my j2me application is listening for sms on specific port, will it run as a server or client? Because if the two application run on same port, who will receive the sms?
And please suggest me, which port I should use to receive the sms, so that I would not loose any sms which is supposed to receive. Actually I have seen the answer for this same question. But I have not got the clear idea. Please suggest me on this.

I am little bit confused. I think when your first application is listening a particular port ( suppose 5001 ) then the other application can not listen it. It might throw error.
for the second question please check this url. This Url will tell you which port you should not listen for your development purpose.

Related

How to implement a "Command line interface server"

If I were creating a webserver then there would be one thread listening to port 8080 and every time there was a new HTTP request then it would trigger some logic in the server. I want to implement the same but instead of listening on port 8080 for HTTP requests, then it would listen for commands from the local operating system (OS) on a command-line interface. These commands can come from any terminal in the OS in the same way as HTTP requests can come from any sender that can access port 8080 on the OS.
I hope I am able to implement an OS-agnostic implementation of this idea in rust. I did try googling this idea without much luck; Likely because I am missing the terminology of this idea.
To clarify one use case:
In one terminal I start my "CLI server": Example: cli_server start
In another terminal I make a "CLI request" to the server and the server will handle the request and respond. The response should be pasted on std.out on the requesting terminal. Example: cli_server fetch_note id-22 or cli_server update_note data_in_file.json
The Server should keep alive until asked to shutdown. It is not known how many independent terminals will access the server at a time.
What I imagine I need is some code similar to the code that listens on port 8080.
It is fine to split the code in a cli_server and cli_client if that makes the answer more simple (or possible).
I do know that I could just implement a web server and use curl to hit port 8080. I am prepared for this as a workaround in case there is no answer to this question. I am interested in an answer to this question out of curiosity and also because that would be a neater solution in my case.
Thanks for reading and I hope my question is not too open ended.

How to access hosted Beanstalkd server

Beginner in Beanstalkd here. I have a hosted Beanstalkd server elsewhere with the following URL : http://beanstalkdhost:1234/here.
Questions:
- How would I be able to view the lists of tubes/jobs available? Note that this server is not hosted by me.
How do I put jobs into the tubes of this server, when specs says it requires a POST and custom headers for a request. The clients (in NodeJS) I have came across over the Internet at the moment, do not allow for custom headers, and also almost always requires a 'port number' parameter which messes up the whole URL. It will end up as 'http://beanstalkdhost:1234/here:1234'.
Do note that I am also running a Windows machine (I believe there might be some limitations).
Will appreciate if I can get some advice.
Thanks in advance!
Beanstalkd is not a webservice. It does not present as a web-URL, but as a TCP socket that a connection is opened to, and bytes are sent to.
Knowing who is running the server for you might help out a lot in assisting you, but it does not appear to be a standard Beanstalkd queue.

Is there a way to switch the connection to another TCP server?

I have made my personal project using WebSocket.
I already know that WebSocket will not connect directly raw TCP Socket.
so, I have thought what if I connect, at first, to Web Server(NodeJS) and then switch to TCP server.
is It possible to switch connection to another server using NodeJS?
If so.
Please let me happy.. Thank you! have a nice day.
I would assume it might be both possible and straightforward to tunnel/proxy TCP traffic. The high level design would be:
Start up a web server with integrated websocket server (use socket.io, really)
When a client makes a websocket connection, create an upstream TCP connection to your target server
Then do full bidirectional piping of messages between the browser<->node socket and the node<->otherServer socket
Devil might be in the details. I haven't tried, but seems feasible.
There's a node project called ws-tcp-bridge as well as a python project that claim to do this already. Neither luke terribly mature, but they might just work or at least provide good reference material.

Creating an SMS server on the PC

I am trying to create an application that would act as an SMS server between multiple virtual instances of Java ME.
I have searched online and have not found anything that dealt with this issue.
This is not to be confused with the link attached that was discussed on stack overflow before.
J2ME SMS Server on mobile phone
I am hoping to create the SMS Server to act as a tester for an actual SMS gateway in a production environment.
Any help will be appreciated
It is definitely possible with j2me
for testing you have to create two application.
In which one application will send sms to a phone no on predefine port and
the receiver application will listen on that port for incoming sms
go through this sample code it will help you.

XMPPHP Could not connect after timeout

I am trying to create a web based PHP application which can allow chat to my Gmail friends. Something like meebo.com. I downloaded XMPPHP, and executed on localhost, and it is working fine, but when I uploaded everything to Yahoo Small business web hosting, it is throwing connection timeout error.
Do anyone else faced such problem. I heard many of them did, but no one have any solution yet.
Any suggestion will be very helpful. I am new to XMPP clients.
Just some ideas...
How are you trying to connect to the XMPP server? With XMPPHP you may use two classes which are
XMPPHP
XMPPHP_BOSH
You might try both, since they work on different ports (XMPPHP for example on 5222 and XMPPHP_BOSH on 80). So if this is a port issue, trying XMPPHP_BOSH would be an idea. You will need to find out though if this is supported by the XMPP server you are trying to connect to. And if so, you need to know the url the server exposes the BOSH service on.
Anyways, I would recommend to check out what kind of 'restrictions' there are in Yahoo Small business web hosting and on the side of the XMPP server.
If you intend to check XMPPHP_BOSH out, consider this issue to make it work: Issue 47: Http-bind error. All in all XMPPHP seems very buggy and incomplete...

Resources