port-number

Regular expression to validate InetSocketAddresses (ipv4/v6 + port addresses)

亡梦爱人 提交于 2019-12-23 16:50:53
问题 I am looking for tested regular expressions for both ipv4 and ipv6 InetSocketAddress (i.e., ip address + port number). I am not interested in validating hostnames. It can be two regex (one for ipv4, one for ipv6) or one combined regex. Does anyone have any to share? EDIT For ip4 format information see here, for ipv6 format information see here. Then, port number is added with ':'. EDIT 2 To create a string representation, I will proceed like this: byte[] tmp = { 10, 1, 0, 0 };

knowing the port number during RMI

不羁岁月 提交于 2019-12-23 15:26:49
问题 Is there a method to know the port number of both the client and server during RMI? When a result is returned during RMI to the client, next time the client requests the result, will the conversation between client and server be at the same port as the previous, when the server has been running since the first result was returned or a new port is created? for example : // call to a remote method add addServerIntf.add(d1,d2) // after this call i get the added result // again call the add

java regex matching ip address and port number as captured groups

 ̄綄美尐妖づ 提交于 2019-12-19 19:57:56
问题 could please anybody tell me what is wrong with this regexp ? ((?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))\\:([0-9]{2,5}) for matching this: assfasfas>192.168.1.1:8080192.168.222.43:8286 I need 192.168.1.1 and 8080 to be captured groups Thank you 回答1: Unless you really, really have to do IP adress validation , as well, I suggest you simplify the regular expression, because this beast is far too complex for only matching "IP part" and "port part"

URL losing port number in every page load

↘锁芯ラ 提交于 2019-12-13 04:18:07
问题 I'm currently taking care of a certain local website. The default port has been changed, and can no longer be not included in the URL due to technical reasons, so now i'm using a certain port in the end of the IP at the URL, for example 100.100.100.100/website.aspx no longer works (which accessed 80 by default) 100.100.100.100:81/website.aspx with the port, works. Works, though I can't click in any link or anything and the port vanishes (new page doesn't load). Then I keep the same URL and

Port Number for Incoming Apple Push Notifications

帅比萌擦擦* 提交于 2019-12-10 19:43:09
问题 What network services, port numbers, outgoing incoming or both, need to be open on a network for an ipod touch to receive Apple Push Notifications? I know the outgoing port number to set when sending the apns. The only thing is, in my school practically every outgoing (and incoming) port is blocked and as a result APNs do not work. I am sure that if I talked to my network administrator and told him which port to unblock, he would do so. So my question is: What network services, port numbers,

How do you decide what port to use?

最后都变了- 提交于 2019-12-03 01:17:32
问题 This is a little subjective, as there are no rules so to speak. Every time I create a server, I think to myself, "What is the best port to use?" I guess an answer is "Any, as long as the user can change it." So, how does everyone else decide how to choose the default port? Personally, I like to use something like 8000-something if it's HTTP related, and I've noticed this is a pretty common trend. But what if 8000 is already in use? Use 8001? It seems a little ad-hoc, and I suppose it is.

How to hide my website port number on website url

寵の児 提交于 2019-12-02 03:04:50
问题 My website has implemented by using JAVA. So we have taken VPS and installed Tomcat then deployed My website is appearing like this whenever I click www.mysite.com in url ... it is appearing as below. http://mysite.com:8080/foldername/ But I would like to see my website as www.mysite.com Can any one suggest me what to do .. should I do any changes in htaccess file ? 回答1: If you don't provide the port number in the URL your HTTP requests would be sent to port 80. You can set up a firewall rule

mysql server port number

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-28 16:56:53
I've just made a database on mysql on my server. I want to connect to this via my website using php. This is the contents of my connections file: $dbhost = 'localhost'; $dbuser = 'root'; $dbpass = 'password'; $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die('Error connecting to mysql'); $dbname = 'epub'; mysql_select_db($dbname); I know what the username/passwords are, and I know the IP address of the server. What I'm just wondering is how do I know which port to use? If your MySQL server runs on default settings, you don't need to specify that. Default MySQL port is 3306. [updated to