port

Exception in thread “main” java.net.BindException: Address already in use

末鹿安然 提交于 2019-12-11 11:22:50
问题 I try to install a java HTTP API on my linux server. I try to execute this command from command pompt to run the service: java -Dfile.encoding=UTF8 -cp .:boilerpipe-1.2.0.jar:lib/nekohtml-1.9.13.jar:lib/xerces-2.9.1.jar:lib/langdetect.jar:lib/jsonic-1.2.8.jar ExampleProgram Then I have this error: Exception in thread "main" java.net.BindException: Address already in use at sun.nio.ch.Net.bind0(Native Method) at sun.nio.ch.Net.bind(Net.java:463) at sun.nio.ch.Net.bind(Net.java:455) at sun.nio

LWUIT app doesn't start in a Blackberry device

孤街浪徒 提交于 2019-12-11 11:18:29
问题 I'm desperate. I'm developing an app in LWUIT, using the Resource editor. My project works fine in MIDP version, both in simulator and on devices. But when I find my issue when I start to test my app in Blackberry. The app works perfectly in the simulator but doesn't start in the devices. It doesn't give an error message, doesn't say anything. I try to change the UI_RIM.jar with the jars from LWUIT SVN or with the other jar generated from the Resource editor (UI_RIM_Touch.jar), but nothing

Docker - how to call bash command from one container into another from the same host? [closed]

隐身守侯 提交于 2019-12-11 11:06:30
问题 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 last year . I have 2 docker containers running (A and B). Have a need to call from within container A -> a bash command inside container B. How to achieve this? 回答1: If your B container looks something like this: docker run -d --name b_container --rm ubuntu:latest sleep 50000 and your A

C++ Sockets with Router

大兔子大兔子 提交于 2019-12-11 09:19:13
问题 I'm making a multiplayer game using sockets and I have some problems with the server side.The server shall be run from my computer which is behind a router. Therefore I'm a little bit stuck with what should the server inet_addr be. I am using port 1234 and I forwarded it to my PC ( the place where I keep the server ). I have tried using my own ip address which i got from myipaddress.com, also my computer's router address ( 192.168.0.101 ). The first try i was getting A LOT of connections

How to specify the source port for an http request in iOS

醉酒当歌 提交于 2019-12-11 08:57:58
问题 I know that it's an unusual thing to need to do, but I need to specify the SOURCE port to be used in an outgoing http(s) request in iOS. I know that there are many different 'standard' ways to send http(s) requests -- from what I understand the most usual involve NSURLConnection and NSURLSession, but I couldn't see if I can specify the source port. Is it possible to somehow use a socket interface to create the socket and then use this socket with NSURLConnection or NSURLSession? Or perhaps

How do I know mapped port of host from docker container?

自古美人都是妖i 提交于 2019-12-11 08:44:44
问题 I have a docker container running where I a have mapped 8090 port of host to 8080 port of docker container (running a tomcat server). Is there any way by which I can get the mapped port information from container? i.e. is there any way by which I can get to know about 8090:8080 mapping from container? 回答1: When you link containers, docker sets environment variables which you can use inside one docker to tell how you can communicate with another docker. You can manually do something similar to

How to keep a php web socket connection open after first connection

て烟熏妆下的殇ゞ 提交于 2019-12-11 08:19:25
问题 I'm using the following code as the server for sockets while i'm trying to learn sockets, but the client code will work once, i have to run the server script every time before i run the clint code. And so when do i ran this server.php to keep listening for client requests? SERVER.PHP $host = "127.0.0.1"; $port = 25003; set_time_limit(0); $socket = socket_create(AF_INET, SOCK_STREAM, 0) or die("Could not create socket\n"); $result = socket_bind($socket, $host, $port) or die("Could not bind to

PC hardware port access from Java on Linux

喜夏-厌秋 提交于 2019-12-11 07:55:27
问题 What is the Java-on-Linux equivalent to the C byte-sized PC-architecture hardware port input/output functions? For output there is outb as in this: tmp = inb(0x61); if (tmp != (tmp | 0x01)) outb(0x61, tmp | 0x01); For input there is inb as in this: tmp = (inb(0x61) & 0xfe); outb(0x61, tmp); Purpose: I want to implement something that imposes less overhead than this: try { Runtime.getRuntime().exec("beep") } catch (IOException e) {} as an alternative to sending code 7 (the bell char) to the

Python client sockets connecting on the same server socket port

强颜欢笑 提交于 2019-12-11 07:27:08
问题 I am working for the first time on sockets with python. I need to connect more than a client socket to the same server socket. To do this I used the the following code: import socket import time import random from threading import Thread import thread import subprocess, signal, os class ServerObject: def __init__(self, port): self.socket = '' self.host = '' self.port = port self.conn = '' self.data = '' print "Server port is: ", self.port def openSocketConnectionAsServer(self): self.socket =

Sockets, PHP, local port

感情迁移 提交于 2019-12-11 06:29:16
问题 I'm writing a PHP-based client using sockets for an existing system. Implementing the protocol is basically working, but for the next step I need to know the local port, on which the socket is created. On the server I have the following output: Socket[addr=/Client-IP,port=40546,localport=1338] For communication to work, I need to get the port 40546 (or whatever it is when connecting). Sadly it is NOT possible to change the protocol for various reasons. Thanks in advcance Adrian EDIT (Code