If TCP is connection oriented why do packets follow different paths?

You, my friend, are confusing the functionality of two different layers. TCP is connection oriented in the sense that there’s a connection establishment, between the two ends where they may negotiate different things like congestion-control mechanism among other things. The transport layer protocols’ general purpose is to provide process-to-process delivery meaning that it doesn’t know … Read more

json-server cannot access via local IP

I found the solution for this issue: json-server –host 192.168.1.XXX my_file.json Using this command, server is deployed on my local IP, and Windows asks for a firewall exception. Another solution is to switch to .NET server – another free simple fake server where I can setup local IP as endpoint. All it needs to: install … Read more

How do I check whether a value in a string is an IP address

Ruby has already the needed Regex in the standard library. Checkout resolv. require “resolv” “192.168.1.1” =~ Resolv::IPv4::Regex ? true : false #=> true “192.168.1.500” =~ Resolv::IPv4::Regex ? true : false #=> false “ff02::1” =~ Resolv::IPv6::Regex ? true : false #=> true “ff02::1::1” =~ Resolv::IPv6::Regex ? true : false #=> false If you like it the … Read more

Java getting my IP address

String ip; try { Enumeration<NetworkInterface> interfaces = NetworkInterface.getNetworkInterfaces(); while (interfaces.hasMoreElements()) { NetworkInterface iface = interfaces.nextElement(); // filters out 127.0.0.1 and inactive interfaces if (iface.isLoopback() || !iface.isUp()) continue; Enumeration<InetAddress> addresses = iface.getInetAddresses(); while(addresses.hasMoreElements()) { InetAddress addr = addresses.nextElement(); ip = addr.getHostAddress(); System.out.println(iface.getDisplayName() + ” ” + ip); } } } catch (SocketException e) { throw new … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)