title: spring integration tcp client send simple message
body: <p>I've been developing a project using spring framework 4. I'm trying to create a simple TCP client via <code>spring-integration-ip</code> library. I've adjusted all configurations:</p>
  
  <h2>applicationContext.xml</h2>
  
  <pre><code>...
  &lt;int:channel id="tcpChannel" /&gt;
  
  &lt;int-ip:tcp-outbound-channel-adapter id="outboundClient"
  channel="tcpChannel"
  connection-factory="tcpConnectionFactory"/&gt;
  
  ...
  </code></pre>
  
  <h2>  bean configuration:</h2>
  
  <pre><code>@Configuration
  public class MyConfiguration{
  
     @Bean
     public AbstractClientConnectionFactory tcpConnectionFactory() { 
         return new TcpNetClientConnectionFactory("localhost", 2345);
     }
  } 
  </code></pre>
  
  <p>I've read all documentations about spring tcp <a href="https://docs.spring.io/spring-integration/reference/html/ip.html" rel="nofollow noreferrer">here</a>.<br>
  I guess I must use  <code>tcp-outbound-channel-adapter</code> or <code>gateway</code> to send messages. but I wonder how to use it; what method should I invoke. I'm not supposed to receive any messages from server.</p>