some example for nio socket