Showing posts with label Network. Show all posts
Showing posts with label Network. Show all posts

Thursday, 4 June 2015

The lost world of java.nio

The O'Reilly book on the subject
I was ask today to help some colleagues with a comms issue on a Telephony application.
When they ask a whole set of questions and problems started to come to mind. What happens with the Garbage Collect, how fast is the code, does it mess packets.

So I had a little look around for some information on Java NIO, it seems to have been kicking butt since Java 1.4 and we have all ignored it.

Indeed for Java 7 it has a new friend … java.NIO.2.

I promised to do some research so here are my results:

Good bye commons-io. You’ve served me well, but I have a new ‘friend’!
In fact if you look at the Channels package (http://docs.oracle.com/javase/7/docs/api/java/nio/channels/Channels.html) it will allow you to convert to your familiar Stream classes while still sending data via the nio classes to your socket (AsynchronousSocketChannel).

And if we really-really want to know how to do this stuff:


NIO.2 Cookbook - http://www.javaworld.com/article/2882984/core-java/nio2-cookbook-part-1.html

I may never use Java.IO again!

Wednesday, 18 December 2013

Cool tip of the day: find that port on a windows PC

I get fed up of never being able to find the port of a particular process on a windows PC.
It is easy under Unix as you can use Grep.
So here is a reminder on how to do it for windows:

netstat -ano | findstr <Port>

Or for the process:

netstat -ano | findstr <PID>

Or for an established connection:

netstat -ano | findstr :80 | findstr ESTABLISHED

See the following other references:

Tuesday, 19 March 2013

Cool tip of the day: Don't trust SSL

How good is SSL?

Not so great according to HAK5.org.
http://www.youtube.com/watch?v=PmtkJKHFX5Q

The key point on this video is don't be a n00b!
Check for real https and use SSH tunneling!

Friday, 8 March 2013

Virgin Media and Stackoverflow

I don't usually complain about my ISP Virgin media but recently I have found their tech support is shockingly bad.
While I will not dwell on one of their IT support guys doing a remote connection to my PC and resetting my network drivers ... blue screen of death!
It looks as if they would not know a network fault if it had a big sign hanging around its neck!
At this time it is impossible for me to access stackoverflow.com and as I am at home doing technical research this is a pain in the arse.
So after the support muppets have told me to restart my PC, change my network settings and reboot my modem ... even when I tell them the iPad can not connect they then tell me I need to contact stackoverflow directly and advise them that that they have blocked the IP range my requests are coming from. That is an interesting idea ... but I can't contact them because I can't get to their web site & emails are blocked!

But it isn't just me ... read on ...

One post suggested using a VPN, which I have now set up.
The free VPN I used was justfreevpn.com which did not at first work.
Why?
Because the Virgin Super hub blocks all PPTP traffic. (Go to your router-->Advanced Settings-->Security-->Firewall and select PPTP Pass through to be on.)





But now I have a VPN to enable when I need to access the blocked sites.

Struth!