Send the specified message as a <code>Datagram</code>.

@param message
the message to send.
961733
public void sendMessage(String message){

		byte[] datagramData = message.getBytes();
		datagramPacket.setData(datagramData);

		try {
			datagramSocket.send(datagramPacket);
		} catch (IOException e) {
			Log.e(TAG, "Failed to send datagram log " + e);
		}
	}
233754
public static void message(String message) {
           getMessageCenter().notify(new Message(message, Message.Severity.Info));
       }
1135105
public void send(Message message)
  {
    Transport smtp = null;

    try {
      smtp = _session.getTransport("smtp");

      smtp.connect();

      smtp.send(message, _to);

      log.fine(this + " sent mail to " + _to[0]);
    } catch (RuntimeException e) {
      throw e;
    } catch (Exception e) {
      throw new RuntimeException(e);
    } finally {
      try {
        if (smtp != null)
          smtp.close();
      } catch (Exception e) {
        log.log(Level.FINER, e.toString(), e);
      }
    }
  }
474612
public void sendToTagged(String message, String ... labels) {
        for (String label : labels) {
            sendToTagged(message, label);
        }
    }
602973
public void transmit(Object message) {
		try {
			boolean commandFlushed = false;
			byte[] b = (byte[]) message;
			for (int i = 0; i < b.length; i++) {
				byte b2 = b[i];
				if ((b2 == 10 || b2 == 13) && !commandFlushed) //NEWLINE / RETURN
				{
					commandFlushed = true;
					if ("exit".equals(command.toString().trim())) {
						close();
					}
					else {
						command.append((char) 10);//.append((char)13);
						proc.getOutputStream().write(command.toString().getBytes());
						proc.getOutputStream().flush();
						command = new StringBuffer();
					}
				}
				else// if (b2 != 13)
				{
					command = command.append((char) b2);
				}
			}
		}
		catch (IOException e) {
//			e.printStackTrace();
			close();
		}
	}
1107589
public static void sendMimeMessage(MimeMessage mimeMessage) {
        try {
            Transport.send(mimeMessage);
        } catch (MessagingException e) {
            throw new IllegalStateException("Can not send message " + mimeMessage, e);
        }
    }
395710
public boolean sendMessage(WebSocketMessage<?> message) {
        boolean sentSuccessfully = false;
        if (sessions.isEmpty()) {
            LOG.warn("No Web Socket session exists - message cannot be sent");
        }

        for (WebSocketSession session : sessions.values()) {
            if (session != null && session.isOpen()) {
                try {
                    session.sendMessage(message);
                    sentSuccessfully = true;
                } catch (IOException e) {
                    LOG.error(String.format("(%s) error sending message", session.getId()), e);
                }
            }
        }
        return sentSuccessfully;
    }
384330
function Channel_sendMessage(message) {
  if (!this._websocket) return

  message = JSON.stringify(message)
  this._websocket.send(message)
}
680680
public boolean sendMessage(SocketChannel channel, Message message) {
    return sendResponse(REQID.zeroREQID, channel, message);
  }
1215594
protected synchronized void sendCommandToShard(VoidMessage message) {
        // if this node is shard - we just step over TCP/IP infrastructure
        // TODO: we want LocalTransport to be used in such cases
        if (nodeRole == NodeRole.SHARD) {
            message.setTargetId(shardIndex);
            messages.add(message);
            return;
        }


        //log.info("Sending CS: {}", message.getClass().getCanonicalName());

        message.setTargetId(targetIndex);
        DirectBuffer buffer = message.asUnsafeBuffer();

        long result = publicationForShards.offer(buffer);

        if (result < 0)
            for (int i = 0; i < 5 && result < 0; i++) {
                try {
                    // TODO: make this configurable
                    Thread.sleep(1000);
                } catch (Exception e) {
                }
                result = publicationForShards.offer(buffer);
            }

        // TODO: handle retransmit & backpressure separately

        if (result < 0)
            throw new RuntimeException("Unable to send message over the wire. Error code: " + result);
    }
368052
public synchronized void sendMessage(final byte[] message) {
    this.send(ReefServiceProtos.JobStatusProto.newBuilder()
        .setIdentifier(this.jobIdentifier)
        .setState(ReefServiceProtos.State.RUNNING)
        .setMessage(ByteString.copyFrom(message))
        .build());
  }
572121
public void setMessage(String message) {
    pushData.clear();
    Map<String, Object> map = AVUtils.createStringObjectMap("alert", message);
    pushData.put("data", map);
  }
986620
protected void sendMessage(String dest, Message message) {
    if (LOG.isTraceEnabled()) {
      LOG.trace("Sends message {} to {}.",
                TextFormat.shortDebugString(message),
                dest);
    }
    this.transport.send(dest, message);
  }
5386
int sendMessage(SIBusMessage sibMessage)
      throws MessageCopyFailedException,
             IncorrectMessageTypeException,
             MessageEncodeFailedException,
             UnsupportedEncodingException
   {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "sendMessage", sibMessage);

      int msgLen = 0;

      // If we are at FAP9 or above we can do a 'chunked' send of the message in seperate
      // slices to make life easier on the Java memory manager
      final HandshakeProperties props = getConversation().getHandshakeProperties();
      if (props.getFapLevel() >= JFapChannelConstants.FAP_VERSION_9)
      {
         msgLen = sendChunkedMessage(sibMessage);
      }
      else
      {
         msgLen = sendEntireMessage(sibMessage, null);
      }

      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "sendMessage", msgLen);
      return msgLen;
   }
835459
public void emit(String message) {
        openSessions.forEach((session) -> {
            try {
                if (session.isOpen()) {
                    session.getBasicRemote().sendText(message);
                }
            }
403071
function Channel_sendMessage(message) {
  if (!this._wsConn) return

  DEBUGMSG("sendMessage", utils.JL(message))
  message = JSON.stringify(message)
  this._wsConn.sendUTF(message)
}
1037711
private void send(String message) {
    String scopeMessage = message.length() + " " + message;
    logger.finest("WRITE : " + scopeMessage);
    byte[] bytes = null;
    try {
      bytes = scopeMessage.getBytes("UTF-16BE");
    } catch (UnsupportedEncodingException e) {
      close();
      connectionHandler.onException(e);
      return;
    }
    ByteBuffer buffer = ByteBuffer.allocate(bytes.length);
    buffer.put(bytes);
    requests.add(buffer);
    monitor.modify(socketChannel, this, SelectionKey.OP_READ | SelectionKey.OP_WRITE);
  }