are you getting some kind of error? I see writemessage but I do not see how it would send to the server being that your tcpclient object is declared inside the method without you passing reference.