function tcp(){
  var _tcp = chrome.sockets.tcp;
  this.option = {},
  this.socketId = 0,

  this.create = function(callback){
    _tcp.create(this.option, function(socketInfo){
      this.socketId = socketInfo.socketId;
      callback();
    }.bind(this));
  }.bind(this),

  this.update = function(){
    _tcp.update(this.socketId, newSocketOption, callback);
  }.bind(this),

  this.pause = function(isPaused, callback){
    _tcp.setPaused(this.socketId, isPaused, callback);
  }.bind(this),

  this.keepAlive = function(enable, delay, callback){
    _tcp.setKeepAlive(this.socketId, enable, delay, function(code){
      if(code < 0){
        this.error(code);
      }else{
        callback();
      }
    }.bind(this));
  }.bind(this),

  this.disconnect = function(callback){
    _tcp.disconnect(this.socketId, callback);
  }.bind(this),

  this.close = function(callback){
    _tcp.close(this.socketId, callback);
  }.bind(this),

  this.error = function(code){
    console.log('An error occured with code ' + code);
  },

  this.init = function(callback){
    this.create(callback);
  }.bind(this)
}

@@ -1097,11 +1097,657 @@
 nd(this)
+,%0A%0A  this.connect = function(address, port, callback)%7B%0A    _tcp.connect(this.socketId, address, port, function()%7B%0A      _tcp.onReceive.addListener(function(info)%7B%0A        if(info.socketId == this.socketId)%7B%0A          this.receive(info);%0A        %7D%0A      %7D.bind(this));%0A      _tcp.onReceiveError.addListener(function(info)%7B%0A        if(info.socketId == this.socketId)%7B%0A          this.error(info.resultCode);%0A        %7D%0A      %7D.bind(this));%0A    %7D.bind(this));%0A  %7D.bind(this),%0A%0A  this.send = function(data, callback)%7B%0A    _tcp.send(this.socketId, data, callback);%0A  %7D.bind(this),%0A%0A  this.receive = function(info)%7B%0A    console.log('Received data.');%0A  %7D
 %0A%7D%0A

add connect send receive in tcp.js