1 package net.pterodactylus.irc;
3 import javax.net.SocketFactory;
5 import com.google.common.eventbus.EventBus;
8 * Default {@link ConnectionFactory} implementation that uses plain sockets to create connections.
10 * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
12 public class DefaultConnectionFactory implements ConnectionFactory {
14 private final EventBus eventBus;
16 public DefaultConnectionFactory(EventBus eventBus) {
17 this.eventBus = eventBus;
21 public Connection createConnection(String hostname, int port) {
22 return new DefaultConnection(eventBus, SocketFactory.getDefault(), hostname, port);