add socket timeout and messge definition