new code

integrate wifi socket