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'm attempting to make a simple server in Java that can communicate with my friends through another Java program, A simple client. I know that I can use localhost to test the program, but if I change the host setting in it to my computers ip address and run the server on my personal computer, then run the client on a different computer, will my computer act as a server?
Yes, you can - when a Client wants to connect to a Server (using java sockets you described above) it needs to specify the Server's IP Address and a Port to connect through, so your own computer can act as a Server and you will need to provide your IP Address and an open port to Clients
Related
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 2 years ago.
Improve this question
I want to handle TCP SYN requests from users to denied some invalid requests to web server (Apache) on a CentOS server
How to write an application in C++ or Java or any programming languages?
You can create a netfilter kernel module (in C language), and hook yourself for various packet events such as receiving a packet on a particular interface etc. You will need to check the packet header to figure out whether it is a TCP SYN request, and then decide what to do with it.
https://www.netfilter.org/
You cannot create a user mode C++ or Java program to achieve this.
That being the answer for what you are asking, perhaps a better alternative would be to add rules to the firewall depending on what invalid requests you want to disable.
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 have developed a java dynamic web project and i am running it now via localhost:portnumber/project Name using tomcat server 6.0. I want to make this project to be run from another machines also by hitting my machine ip address.
So how can i achieve this?
Thanks in advance.
Yes, its very much doable. very easy if you are on same network. You can access it with below format
"YOUR_MACHINE_IP:PORT_NUMBER/project Name"
make sure the port is not blocked for outside requests. possible if firewall configured.
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
I'am wondering if there is a way to make a peer-to-peer or phone to phone connection, lets say is a chat room or a game online, it is required to have a server that accepts socket connections or is there an easy way to do this? I'am talking about android phone-to-phone application via sockets, cause I don't know where can I get a free java server to make this possible
You could probably host a server instance on one of the phones, have that phone connect to itself, and have the other phone connect to the hosting phone. This way would also allow for multiple phones to connect to eachother.
Although I haven't done any android programming i've been playing a game that does this through either wifi, or bluetooth...
I can't help you with code or anything but here's a link to the designer's blog
http://www.sleepingbeastgames.com/blog/
I answered in an answer because I can't comment yet :(
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 9 years ago.
Improve this question
I am planning to create an android application that will communicate into a pc server. does java socket programming works with different internet to android mobile device? example is my android mobile device is using gprs while my pc server is connected to dsl/modem
Yes, they do work and there are many applications that are built on such a set-up. Try out simple client-server examples. Concentrate on creating the server first. You have to make sure that the firewall that your PC server is on, allows the server to accept connections and also that the IP address that you are connecting to is not a local IP. Check out the articles here, here etc
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
I have a server which I install openvpn.
I have config some client and now I want to create an openvpn client to connect to it with the client config I've created.
I know there is an OpenVpn client on the market.
But, how can I do my own client with the VPN API (VpnService, ...)
Because I want to provide the client config with the app, so the client will just connect the android system
The source of the OpenVPN for Android client is available under http://github.com/schwabe/ics-openvpn/. The subset of files that is needed to have a working Android OpenVPN core is relatively small since the client has a relatively good control and UI separation.
There are already a number of clients on the Play using the ics-openvpn project as basis (often without proper copyright attribution and without providing source code as the GPL requires)