Send an object to the remote server; block and return the reply
        if the socket type is REQ.

        :param obj:
            the Python object to send
429659
def send(self, obj):
        
        self.zsocket.send_pyobj(obj)
        self.num_sent += 1
        if self.socket_type == zmq.REQ:
            return self.zsocket.recv_pyobj()
1120428
def recv(self, blocking=True):
        """"""
        length = struct.unpack("<I", self.sock.recv(4))[0]
        return self._get_next_obj(length)
1182882
def respond(self, packet, peer, flags=0):
        
        self.sock.sendto(packet, flags, peer)
955697
def _send(self, ip, port, data):
        
        return self._listen_socket.sendto(data, (ip, port))
200511
def send(self, item, timeout=-1):
        
        return self.sender.send(item, timeout=timeout)
255747
public int sendTCP (Object object) {
		if (object == null) throw new IllegalArgumentException("object cannot be null.");
		try {
			int length = tcp.send(this, object);
			if (length == 0) {
				if (TRACE) trace("kryonet", this + " TCP had nothing to send.");
			} else if (DEBUG) {
				String objectString = object == null ? "null" : object.getClass().getSimpleName();
				if (!(object instanceof FrameworkMessage)) {
					debug("kryonet", this + " sent TCP: " + objectString + " (" + length + ")");
				} else if (TRACE) {
					trace("kryonet", this + " sent TCP: " + objectString + " (" + length + ")");
				}
			}
			return length;
		} catch (IOException ex) {
			if (DEBUG) debug("kryonet", "Unable to send TCP with connection: " + this, ex);
			close();
			return 0;
		} catch (KryoNetException ex) {
			if (ERROR) error("kryonet", "Unable to send TCP with connection: " + this, ex);
			close();
			return 0;
		}
	}
70823
def send_command(self, obj, command, *arguments):
        
        index_command = obj._build_index_command(command, *arguments)
        self.chassis_list[obj.chassis].sendQueryVerify(index_command)
907073
def send(self, obj):
		""""""
		if not isinstance(obj, NotificationMessage):
			raise ValueError, u"You can only send NotificationMessage objects."
		self._send_queue.put(obj)
688547
def _sendDDEcommand(self, cmd, timeout=None):
        """"""
        reply = self.conversation.Request(cmd, timeout)
        if self.pyver > 2:
            reply = reply.decode('ascii').rstrip()
        return reply
414500
def render_to_response(self, obj, **response_kwargs):
        
        return HttpResponse(self.serialize(obj), content_type='application/json', **response_kwargs)
403600
def send_frame(self, frame):
        '''
        
        '''
        if self._closed:
            if self._close_info and len(self._close_info['reply_text']) > 0:
                raise ConnectionClosed("connection is closed: %s : %s" %
                                       (self._close_info['reply_code'],
                                        self._close_info['reply_text']))
            raise ConnectionClosed("connection is closed")

        if self._transport is None or \
                (not self._connected and frame.channel_id != 0):
            self._output_frame_buffer.append(frame)
            return

        if self._debug > 1:
            self.logger.debug("WRITE: %s", frame)

        buf = bytearray()
        frame.write_frame(buf)
        if len(buf) > self._frame_max:
            self.close(
                reply_code=501,
                reply_text='attempted to send frame of %d bytes, frame max %d' % (
                    len(buf), self._frame_max),
                class_id=0, method_id=0, disconnect=True)
            raise ConnectionClosed(
                "connection is closed: %s : %s" %
                (self._close_info['reply_code'],
                 self._close_info['reply_text']))
        self._transport.write(buf)

        self._frames_written += 1
302732
def send_packet(self, dev, packet):
        '''
        
        '''
        if packet is None:
            raise ValueError("No packet object given to send_packet")
        if not isinstance(packet, Packet):
            raise ValueError("Object given to send_packet is not a Packet (it is: {})".format(type(packet)))
 
        intf = None
        if isinstance(dev, int):
           dev = self._lookup_devname(dev)

        if isinstance(dev, Interface):
            intf = dev
            dev = dev.name
        elif dev in self._devinfo:
            intf = self.interface_by_name(dev)
        else:
            raise ValueError("Unrecognized device name for packet send: {}".format(dev))

        if intf.iftype == InterfaceType.Loopback:
            pdev = self._localsend.get(dev, None)
            pdev.send_packet(packet)
        else:
            pdev = self._pcaps.get(dev, None)
            rawpkt = packet.to_bytes()
            log_debug("Sending packet on device {}: {}".format(dev, str(packet)))
            pdev.send_packet(rawpkt)
1001367
def send(_dict, addr):
        
        # TODO(rbtz@): IPv6 support
        udp_sock = socket(AF_INET, SOCK_DGRAM)
        # TODO(rbtz@): Add batch support
        for item in _dict.items():
            udp_sock.sendto(":".join(item).encode('utf-8'), addr)
1302732
def _attach_obj(self, req, obj):
        """"""

        # Attach the object to the request
        json.dump(obj, req)

        # Also set the content-type header
        req['content-type'] = self._content_type
1333702
public boolean sendResponse(REQID rid, SocketChannel channel, Message response) {
    SocketChannelHelper helper = activeConnections.get(channel);
    if (helper == null) {
      LOG.severe("Trying to send a response on an unknown connection");
      return false;
    }
    OutgoingPacket opk = new OutgoingPacket(rid, response);
    helper.sendPacket(opk);
    return true;
  }
277496
def put(self, obj):
        
        self._queue.put(obj, block=True, timeout=self._queue_put_timeout)
        if obj is _SHUTDOWNREQUEST:
            return
1274402
def _send(self, params):
        
        # Get a response
        try:
            r = requests.get(self.url, params=params)
        # catch errors, print then exit.
        except requests.exceptions.RequestException as e:
            print(e)
        return r.json(strict=False)